devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: "broonie@opensource.wolfsonmicro.com"
	<broonie@opensource.wolfsonmicro.com>, "lrg@ti.com" <lrg@ti.com>,
	"grant.likely@secretlab.ca" <grant.likely@secretlab.ca>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V1] regulator: fixed: dt: add property for gpio open drain flag
Date: Mon, 7 May 2012 20:38:43 +0530	[thread overview]
Message-ID: <4FA7E57B.30804@nvidia.com> (raw)
In-Reply-To: <4FA7E4A3.6050004@wwwdotorg.org>

On Monday 07 May 2012 08:35 PM, Stephen Warren wrote:
> On 05/07/2012 04:28 AM, Laxman Dewangan wrote:
>> Add property for the gpio flag open drain when registering
>> fixed regulator.
>> diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt ...
>> +- gpio-open-drain: GPIO is open drain type.
>> +  If this property is missing then default assumption is false.
> Given that there's a GPIOF_OPEN_DRAIN, isn't the GPIO specifier in the
> gpio property meant to encode this somehow (the format is up to the GPIO
> controller's binding) - the flags are returned by of_get_named_gpio_flags().
>
> (especially given you asked me off-list about updating the GPIO binding
> documentation with information about the flags that Tegra's binding
> documented for this)

gpio of binding does not explain that there is always gpio flag  
(GPIOF_*) in gpio cell argument. It is up to the chip specific gpio 
driver how they implement the argumnets.
For the example of gpio-samsung have the 4 argument list and all are for 
different purpose. And if they want to set pin as open drain, it will 
not be possible  on their argument list as none of the cell argument 
reflect to GPIOF_* flag.
For the case of tegra, there is no of_xlate() implementation and hence 
it is by default return as GPIOF_.

And the client driver which is indpendent of chip specific gpio driver 
should able to handle this.



  reply	other threads:[~2012-05-07 15:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 10:28 [PATCH V1] regulator: fixed: dt: add property for gpio open drain flag Laxman Dewangan
2012-05-07 11:35 ` Mark Brown
2012-05-07 15:05 ` Stephen Warren
2012-05-07 15:08   ` Laxman Dewangan [this message]
2012-05-07 15:20     ` Stephen Warren
2012-05-07 16:24       ` Mark Brown
2012-05-08 21:26         ` Stephen Warren
2012-05-09 10:14           ` Mark Brown

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=4FA7E57B.30804@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=swarren@wwwdotorg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).