Message ID | 1344691906-15985-1-git-send-email-thomas.petazzoni@free-electrons.com |
---|---|
State | New |
Headers | show |
On Sat, Aug 11, 2012 at 3:31 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> FWIW: Acked-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
Hi, On Sat, Aug 11, 2012 at 03:31:43PM +0200, Thomas Petazzoni wrote: > +- gpio-controller: marks the device node as a gpio controller > + > +- ngpios: number of GPIOs this controller has > + > +- #gpio-cells: Should be one. It is the pin number. Most platforms will hit a need to encode polarity of the GPIO, in particular on inputs. Having an extra cell for flags is quite useful.
On Mon, Aug 27, 2012 at 11:53 PM, Olof Johansson <olof@lixom.net> wrote: > Hi, > > On Sat, Aug 11, 2012 at 03:31:43PM +0200, Thomas Petazzoni wrote: >> +- gpio-controller: marks the device node as a gpio controller >> + >> +- ngpios: number of GPIOs this controller has >> + >> +- #gpio-cells: Should be one. It is the pin number. > > Most platforms will hit a need to encode polarity of the GPIO, in > particular on inputs. Having an extra cell for flags is quite useful. Isn't that surplus in this case since this driver has a proper pinctrl backend controlling such stuff? I don't really like pinctrl portions of GPIOs being showeled into the GPIO actually. Or am I just getting this wrong...? Yours, Linus Walleij
On Sun, Sep 2, 2012 at 12:33 AM, Linus Walleij <linus.walleij@linaro.org> wrote: > On Mon, Aug 27, 2012 at 11:53 PM, Olof Johansson <olof@lixom.net> wrote: >> Hi, >> >> On Sat, Aug 11, 2012 at 03:31:43PM +0200, Thomas Petazzoni wrote: >>> +- gpio-controller: marks the device node as a gpio controller >>> + >>> +- ngpios: number of GPIOs this controller has >>> + >>> +- #gpio-cells: Should be one. It is the pin number. >> >> Most platforms will hit a need to encode polarity of the GPIO, in >> particular on inputs. Having an extra cell for flags is quite useful. > > Isn't that surplus in this case since this driver has a proper > pinctrl backend controlling such stuff? I don't really like > pinctrl portions of GPIOs being showeled into the GPIO > actually. Or am I just getting this wrong...? Ah, yes, true. Last time I had to add this was for a platform that lacked pinctrl bindings (exynos). I guess it doesn't hurt to add the flag since it might be used on other OSes that have a gpio driver but not a pinctrl one, but that's a pretty far corner case, no need to revise for it. -Olof
On Wed, Sep 5, 2012 at 6:51 AM, Olof Johansson <olof@lixom.net> wrote: > I guess it doesn't hurt to add the flag since it might be used on > other OSes that have a gpio driver but not a pinctrl one, but that's a > pretty far corner case, no need to revise for it. Sounds a bit ambigous and redundant, as we are in the driver seat for device tree I'd prefer to force every other OS to get their pinctrl concepts right ;-) Linus Walleij