From: swarren@wwwdotorg•org (Stephen Warren)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v10] reset: Add driver for gpio-controlled reset pins
Date: Mon, 12 Aug 2013 09:50:02 -0600 [thread overview]
Message-ID: <5209042A.3060104@wwwdotorg.org> (raw)
In-Reply-To: <1376305484.22237.37.camel@pizza.hi.pengutronix.de>
On 08/12/2013 05:04 AM, Philipp Zabel wrote:
> Am Donnerstag, den 08.08.2013, 12:43 -0600 schrieb Stephen Warren:
...
>> Equally, if every binding is either-or, you may as well force drivers
>> passing the binding to just call different APIs based on their binding
>> definition.
>>
>> If (2), then you'd need to pass both the legacy property name and
>> reset-names value separately, since I imagine those values would be
>> different, consider:
>>
>> old:
>>
>> nvidia,phy-reset-gpio = <&gpio 1 0>;
>>
>> new:
>>
>> reset-gpios = <&gpio 1 0>;
>> reset-names = "phy";
>
> Correct. In this case:
>
> rstc = of_get_named_reset_control(np, "nvidia,phy-reset-gpio", 0);
> if (IS_ERR(rstc)) {
> ret = PTR_ERR(rstc);
> if (ret == -EPROBE_DEFER)
> return ret;
> rstc = reset_control_get(dev, "phy");
> if (IS_ERR(rstc))
> return PTR_ERR(rstc);
> }
>
> Maybe encapsulate this in a convenience wrapper:
>
> rstc = reset_control_get_legacy(dev, "phy", "nvidia,phy-reset-gpio");
Yes, that's exactly what I envisaged. Thanks.
prev parent reply other threads:[~2013-08-12 15:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 9:26 [PATCH v10] reset: Add driver for gpio-controlled reset pins Philipp Zabel
2013-07-18 12:06 ` Shawn Guo
2013-08-02 9:28 ` Mark Rutland
2013-08-02 20:09 ` Stephen Warren
2013-08-05 15:13 ` Mark Rutland
2013-08-05 17:22 ` Stephen Warren
2013-08-05 7:32 ` Philipp Zabel
2013-08-05 15:35 ` Mark Rutland
2013-08-06 7:38 ` Roger Quadros
2013-08-05 17:24 ` Stephen Warren
2013-08-06 7:32 ` Philipp Zabel
2013-08-06 16:59 ` Stephen Warren
2013-08-08 9:42 ` Philipp Zabel
2013-08-08 18:43 ` Stephen Warren
2013-08-12 11:04 ` Philipp Zabel
2013-08-12 15:50 ` Stephen Warren [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5209042A.3060104@wwwdotorg.org \
--to=swarren@wwwdotorg$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox