On 2014/12/3 21:45, Linus Walleij wrote:
On Tue, Dec 2, 2014 at 5:32 AM, Yunlei He <[email protected]> wrote:

Gpio-ranges property is useful to represent which GPIOs correspond
to which pins on which pin controllers. But there may be some gpios
without pinctrl operation. So check whether gpio-ranges property
exists in device node first.

Signed-off-by: Yunlei He <[email protected]>
Signed-off-by: Xinwei Kong <[email protected]>
Signed-off-by: Haojian Zhuang <[email protected]>

Yep simple and elegant.

Patch applied.

However I wonder if it would be possible to move this to the
gpiolib.c or gpiolib-of.c core so not all drivers with this problem
has to implement it.

Yours,
Linus Walleij


Thanks for your suggest, I can move this judgement to the gpiolib.c in function
gpio_request() along with a symbol uses_pinctrl in struct gpio_chip. But the 
symbol
uses_pinctrl still need to assign a value in device initial time. So I think 
that drivers
do this separately is better.

Yours,
Yunlei

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to