[RFC PATCH 1/5] Rework OpenFirmware GPIO handling

Anton Vorontsov cbouatmailru at gmail.com
Wed Nov 18 03:12:44 EST 2009


On Tue, Nov 17, 2009 at 06:42:22PM +0300, Dmitry Eremin-Solenikov wrote:
> This patch improves OF GPIO bindings so, that most non-OF-specific gpio
> controllers don't need to call any of OF binding function:
> 
> 0) Move of_gpio_chip into main gpio_chip structure.
> 1) Call of_gpio_init/destroy from gpiochip_add/remove.
> 2) By default supply reasonable defaults for gpio_cells/xlate

Heh.. you didn't google before writing the code, did you? ;-)

I don't really think that David will like this approach, just as
he didn't like the previous one (which was even less intrusive,
but still wrong):

http://lkml.org/lkml/2008/10/16/248 (a huge thread, but worth reading)

Both of the approaches do not solve the pdata issue.

There are some of David's [absolutely legitimate] comments:
http://lkml.org/lkml/2008/10/20/43

Some more thoughts:
http://lkml.org/lkml/2008/10/20/182

And it turned out that the only sane solution is to write
OF-pdata-hooks for the each driver (that we do for many drivers
already):

http://lkml.org/lkml/2008/10/22/471

And for this, you'll need the patches that I sent to you
yesterday.

Thanks,

-- 
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2


More information about the Linuxppc-dev mailing list