[PATCH v8 03/12] gpio: find gpio base by ascend order

Linus Walleij linus.walleij at linaro.org
Tue Feb 5 12:14:32 EST 2013


On Sat, Feb 2, 2013 at 6:25 PM, Haojian Zhuang
<haojian.zhuang at linaro.org> wrote:

> gpiochip_find_base() always tries to find valid gpio with descend order.
> It's inconvient if gpio information is passing from DTS. Now try to find
> valid gpio with ascend order.
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang at linaro.org>

This is more scary stuff.

As you know GPIO numbers are exposed to userspace.

Systems with this change risk having their dynamically added
GPIO controller enumerated in a different fashion. And
userspace clients may be relying on these numbers.

And we do not break userspace.

I know this is not elegant but I'm afraid the descending search
needs to be kept for compatibibility reasons.

BTW: please CC Grant likely on all patches.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list