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