Thread (1 message) 1 message, 1 author, 27d ago

Re: [PATCH v5 2/3] gpiolib: add get_config() and gpiochip_generic_get_config()

From: Mehmet Fide <hidden>
Date: 2026-09-09 08:08:19
Also in: imx, linux-gpio, lkml

From: Mehmet Fide <redacted>

Hi Haibo,

On Wed, Sep 09, 2026 at 02:30:18PM +0800, Bough Chen wrote:
quoted
Should the pre-existing setter stub also be updated to return -ENOTSUPP
to ensure consistent API behavior?
I think Sashiko is correct, better to aligned here, but in a separate patch.
Agreed. v6 will start with a preparatory patch that makes both
CONFIG_PINCTRL=n stubs, pinctrl_gpio_get_config() and
pinctrl_gpio_set_config(), return -ENOTSUPP. With CONFIG_PINCTRL=y a
chip without pin ranges already gets -ENOTSUPP from
gpiochip_generic_config(), so every caller of that path handles the
value today; the only other users of the stubs, gpio-by-pinctrl and
gpio-aspeed, are pinctrl-backed drivers. I will compile-test a
CONFIG_PINCTRL=n GPIOLIB build with the change.
If changing the CONFIG_PINCTRL=n stub in include/linux/pinctrl/consumer.h
to return -ENOTSUPP, then I think you can drop the explicit "#else return
-ENOTSUPP" in gpiochip_generic_get_config()
Yes, the #else goes away in v6.

Thanks for the review,
Mehmet
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help