[PATCH V1] regulator: fixed: dt: add property for gpio open drain flag

Mark Brown broonie at opensource.wolfsonmicro.com
Wed May 9 20:14:28 EST 2012


On Tue, May 08, 2012 at 03:26:16PM -0600, Stephen Warren wrote:
> On 05/07/2012 10:24 AM, Mark Brown wrote:

> > It's really not idiomatic for drivers using GPIOs to allow
> > configuration of their flags in the first place.  Or, quite
> > frankly, to use flags. Honestly I'd not expect any bindings that
> > the GPIO driver provides to have any attention at all paid to them
> > most of the time, looking at the code seems to support that (though
> > there's surprisingly few bindings using GPIOs at all it seems).

> So, are you saying we should remove the flags from the GPIO bindings,
> and do something custom in each consumer?

Not really, it's more internal Linux stuff with the gpio API being a bit
stuck.

> Right now, we can't rely on of_get_gpio_flags(), since not all GPIO
> drivers actually allow flags to be represented in bindings.

> However, having each client have a unique binding for things like
> open-drain, inverted, ... seems bad; there are probably fewer
> providers than consumers, although a single standardized

It really depends what the device is doing with the GPIO, we would at
least need to have a way for the user to get the flags back out in case
the configuration is important for what it does.  Most of this stuff is
going to be nonsensical for most uses anyway, though, and obviously
there's the whole middleware emulation thing as well.

> representation might admittedly have been ever better.

Well, that's legacy device tree stuff for you :/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20120509/12230fb4/attachment.sig>


More information about the devicetree-discuss mailing list