]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: qcom: disable GPIO groups with no pins
authorTimur Tabi <timur@codeaurora.org>
Wed, 20 Dec 2017 19:10:32 +0000 (13:10 -0600)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 21 Dec 2017 12:04:35 +0000 (13:04 +0100)
commitd42b424268d2bc621d90eddc75277eb8388dcbae
tree479035b14d57340c881bd7e0a2f0f26b09f3a367
parent14aa4adb3f860379b5ebcb9f5a8d08fc4b42b6f2
pinctrl: qcom: disable GPIO groups with no pins

pinctrl-msm only accepts an array of GPIOs from 0 to n-1, and it expects
each group to support have only one pin (npins == 1).

We can support "sparse" GPIO maps if we allow for some groups to have zero
pins (npins == 0).  These pins are "hidden" from the rest of the driver
and gpiolib.

Access to unavailable GPIOs is blocked via a request callback.  If the
requested GPIO is unavailable, -EACCES is returned, which prevents
further access to that GPIO.

Signed-off-by: Timur Tabi <timur@codeaurora.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/qcom/pinctrl-msm.c