[PATCH v7 08/15] gpio: pl061: bind pinctrl by gpio request

Linus Walleij linus.walleij at linaro.org
Tue Jan 22 05:10:08 EST 2013


On Tue, Jan 22, 2013 at 10:55 AM, Haojian Zhuang
<haojian.zhuang at linaro.org> wrote:

>> Add a function to gpiolib.c to check if a certain gpio is in the range
>> of the current chip.
>>
>> Then use that:
>>
>> if (gpio_in_pinrange(gpio))
>>     pinctrl_request_gpio(gpio);
>>
>> Yours,
>> Linus Walleij
>
> It seems better. I'll update it.

Hm the function above will need to pass the chip as parameter as
well, so a bit simplified.

Maybe it's better to add a function like gpio_check_pinctrl_backend(chip, gpio);
that does the above two statements?

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list