[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120507162419.GK17002@opensource.wolfsonmicro.com>
Date: Mon, 7 May 2012 17:24:20 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Stephen Warren <swarren@...dotorg.org>
Cc: Laxman Dewangan <ldewangan@...dia.com>, "lrg@...com" <lrg@...com>,
"grant.likely@...retlab.ca" <grant.likely@...retlab.ca>,
"devicetree-discuss@...ts.ozlabs.org"
<devicetree-discuss@...ts.ozlabs.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH V1] regulator: fixed: dt: add property for gpio open
drain flag
On Mon, May 07, 2012 at 09:20:33AM -0600, Stephen Warren wrote:
> My point is that there's clear intent for of_gpio_simple_xlate() to
> return the GPIO flags from a field in the GPIO specifier in device tree,
> irrespective of whether some GPIO bindings don't allow this, or whether
> this is fully documented.
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).
Before we start doing stuff to improve this it feels like we should do
things like get devm_ versions of gpiolib APIs in there (since most
conversions would really benefit from that too) - I've been sending a
patch for that but my backlog of unmerged patches for it keeps getting
bigger rather than smaller.
> We shouldn't have two different mechanisms to represent this
> information. How do we resolve the situation where a particular SoC's
> GPIO binding allows the flags to be specified, and this patch allows the
> open-drain flag to be specified, and the two values are different?
> Either we should force all bindings to have some way of specifying the
> flags, or we should remove the flags from all bindings and rely on
> separate properties.
There's also the case where the bindings probably should be ignored
because the device driver knows what the connection has to be anyway and
there's no point in forcing people to encode it in the binding.
It's a real shame all these bindings are driver specific, it's just like
interrupts :(
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists