Re: [PATCH v2] gpio: davinci: implement .get_direction()
From: Michael Walle
Date: Fri Jan 09 2026 - 09:17:13 EST
Hi,
On Fri Jan 9, 2026 at 2:08 PM CET, Bartosz Golaszewski wrote:
> It's strongly recommended for GPIO drivers to always implement the
> .get_direction() callback - even for fixed-direction controllers.
>
> GPIO core will even emit a warning if the callback is missing, when
> users try to read the direction of a pin.
>
> Implement .get_direction() for gpio-davinci.
I must be blind! I didn't see the direction register and I assumed
that the direction is fixed and only known by the pinctrl (as on k3
SoCs, you have to hardcode the directions of GPIOs in the device
tree.
Thanks for taking care.
> Reported-by: Michael Walle <mwalle@xxxxxxxxxx>
> Closes: https://lore.kernel.org/all/DFJAFK3DTBOZ.3G2P3A5IH34GF@xxxxxxxxxx/
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
This will need a
Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support")
Otherwise the sa67 board will be broken with the defconfig (or any
config enabled ARCH_QCOM).
Tested-by: Michael Walle <mwalle@xxxxxxxxxx> # on sa67
-michael
Attachment:
signature.asc
Description: PGP signature