]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pinctrl: qcom: spmi-gpio: implement .get_direction()
authorNeil Armstrong <neil.armstrong@linaro.org>
Wed, 4 Mar 2026 17:41:08 +0000 (18:41 +0100)
committerLinus Walleij <linusw@kernel.org>
Tue, 10 Mar 2026 09:21:52 +0000 (10:21 +0100)
commit263447532463cf4444a3595e835b99a4e90952fa
tree86fa275879c193ad8992d8842d0aaf0845550ff5
parent1f318b96cc84d7c2ab792fcc0bfd42a7ca890681
pinctrl: qcom: spmi-gpio: implement .get_direction()

GPIO controller driver should typically implement the .get_direction()
callback as GPIOLIB internals may try to use it to determine the state
of a pin. Since introduction of shared proxy, it prints a warning splat
when using a shared spmi gpio.

The implementation is not easy because the controller supports enabling
the input and output logic at the same time, so we aligns on the
behaviour of the .get() operation and return -EINVAL in other
situations.

Fixes: eadff3024472 ("pinctrl: Qualcomm SPMI PMIC GPIO pin controller driver")
Fixes: d7b5f5cc5eb4 ("pinctrl: qcom: spmi-gpio: Add support for GPIO LV/MV subtype")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c