Re: [PATCH] gpiolib: return quietly from gpiod_get_direction() without .get_direction()

From: Bartosz Golaszewski

Date: Wed Aug 26 2026 - 11:15:05 EST


On Thu, 20 Aug 2026 13:12:34 +0200, Mehmet Fide <mehmet.fide@xxxxxxxxx> said:
> Hello,
>
> A gentle ping on this one, sent a week ago and I have not seen a reply:
>

Yeah, this is August in Europe for you, I've been OoO and will be until the
end of this month.

> https://lore.kernel.org/linux-gpio/20260813193715.2346477-1-mehmet.fide@xxxxxxxxx/
>
> To recap: gpiod_get_direction() warns when a chip has no .get_direction(),
> which is a legitimate thing for a chip to lack. On vf610 the direction is
> not in the GPIO block at all, it is a bit of the pinmux pad register, so
> the driver cannot implement the callback and every caller that asks for a
> direction produces a WARN.
>
> Happy to respin or take a different approach if you would rather solve it
> elsewhere.

I would rather implement the missing callback in gpio-mmio. We already call
into pinctrl if needed when setting direction, could we call
pinctrl_gpio_get_config() here and read the direction from the underlying
pinctrl driver?

Thanks,
Bartosz