[PATCH] gpiolib: Add of_get_gpio_chip_by_phandle() helper

viresh kumar viresh.linux at gmail.com
Mon May 7 11:51:31 EDT 2012


On Mon, May 7, 2012 at 6:38 PM, Linus Walleij <linus.walleij at linaro.org> wrote:
> On Wed, May 2, 2012 at 6:51 PM, viresh kumar <viresh.linux at gmail.com> wrote:
>
>> So i need someway of accessing gpio chip
>> from pinctrl driver. How should i do it?
>
> I once proposed a patch like this to gpiolib and Grant NACK:ed it.
> It was one of the reasons I created pinctrl to begin with...

@Grant/Linus: Any specific reason, why it got rejected?

I don't feel there is anything wrong in this approach and is a very
clean solution to
bind two drivers.

> The U300 solution isn't super-clean, and I have another
> solution for Nomadik which is cleaner, but there GPIO and
> pinctrl is in the same file. Expect to mail that out tomorrow.

Even that is not so clean. You are creating another mess in order to fix one.
Two drivers implementing separate functionality must be kept separate.

--
viresh



More information about the linux-arm-kernel mailing list