[PATCH 1/5] pxa: Sane naming of gpios for palm platform

Joe Perches joe at perches.com
Tue Jul 13 12:20:01 EDT 2010


On Tue, 2010-07-13 at 18:20 +0800, Eric Miao wrote:
> > GPIO_NR was never intended to be used. It's some stupidity with historic roots.
> > (NR == number ... it was intended to be substituted, but never was ... time to
> > do it).
> I think it's acceptable - my preferable choice would be GPIO_xxxx. But
> the idea of encoding GPIO number into the macro itself is not good. E.g.
> GPIO_MMC_DETECT is self explanatory, no need for GPIO9_MMC_DETECT.
> Later you find the GPIO number is actually 10, now you have to modify
> _every_ place this macro appears, instead of a one liner patch.

I agree with Eric.
Another scenario is another board comes along nearly
but not quite identical.

>>> +70kb duplicated email reply crud

Please remember to trim unnecessary stuff.




More information about the linux-arm-kernel mailing list