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

From: Linus Walleij

Date: Tue Mar 10 2026 - 05:34:50 EST


On Wed, Mar 4, 2026 at 6:41 PM Neil Armstrong <neil.armstrong@xxxxxxxxxx> wrote:

> 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>

Patch applied for fixes.

Yours,
Linus Walleij