Re: [PATCH] pinctrl: qcom: spmi-gpio: implement .get_direction()

From: Bartosz Golaszewski

Date: Thu Mar 05 2026 - 03:42:03 EST


On Wed, 4 Mar 2026 18:41:08 +0100, Neil Armstrong
<neil.armstrong@xxxxxxxxxx> said:
> 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@xxxxxxxxxx>
> ---

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>