[PATCH v7 06/15] gpio: find gpio base by ascend order

Haojian Zhuang haojian.zhuang at linaro.org
Sat Feb 9 12:15:33 EST 2013


On 9 February 2013 21:45, Grant Likely <grant.likely at secretlab.ca> wrote:
> On Fri, 18 Jan 2013 15:31:10 +0800, 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.
>
> Why is it more convenient? Just to make the numbers smaller? The reason
> it uses a descending search is to mimimize the possibility of collision
> with fixed GPIO numbers.
>
> g.
>

I tried to parse global gpio number dynamically from DT, so I also used
gpiochip_find_base() to seek gpio number. If it's descending order, all the
gpio number are not also descending order. It will be inconvenient for
linking it to SoC datasheet & schematic. Since changing it to ascending
order may break user space application, Linus NACKed.

Now I'm trying to use fixed gpio number from machine driver.

Regards
Haojian



More information about the linux-arm-kernel mailing list