[PATCH 0/2] [v5] pinctrl: qcom: add support for sparse GPIOs
From: Linus Walleij <hidden>
Date: 2017-10-11 07:51:09
Also in:
linux-arm-msm, linux-gpio
From: Linus Walleij <hidden>
Date: 2017-10-11 07:51:09
Also in:
linux-arm-msm, linux-gpio
On Wed, Oct 4, 2017 at 12:03 AM, Stephen Boyd [off-list ref] wrote:
Could we remove the pin direction finding part here in
gpiochip_add_pin_range() and lazily resolve the pin direction
when a pin is requested? We would need a similar check in the msm
specific debugfs code where we skip pins that aren't requested.
This is basically a revert of commit 72d320006177 ("gpio: set up
initial state from .get_direction()").It seems reasonable for the gpiolib to be able to call this function immediately after registering the new GPIO chip with its vtable. I think it is more up to the driver to numb the reply with some dummy return value (i.e. input mode) or refactor the callback so that it is acceptable for gpiolib to get an -EINVAL or so from the driver (again it will assume input mode) if the driver can't return the direction at this time. Yours, Linus Walleij