Re: [PATCH] pinctrl: renesas: rzv2m: Use -ENOTSUPP instead of -EOPNOTSUPP

From: Geert Uytterhoeven

Date: Wed May 27 2026 - 03:04:59 EST


On Fri, 22 May 2026 at 12:57, Claudiu Beznea <claudiu.beznea@xxxxxxxxxx> wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
>
> The pinctrl and GPIO core code make exceptions for the -ENOTSUPP error
> code. One such example is gpio_set_config_with_argument_optional(), which
> returns success when gpio_set_config_with_argument() returns -ENOTSUPP, but
> reports failure for all other error codes.
>
> Returning -EOPNOTSUPP from the pinctrl driver on the unsupported pinctrl
> operation may lead to boot failures when pinctrl drivers implements
> struct gpio_chip::set_config, the system uses GPIO hogs, and the
> struct gpio_chip::set_config implementation returns -EOPNOTSUPP for the
> unsupported operations.
>
> Currently, the driver does not implement struct gpio_chip::set_config().
> To avoid future failures, return -ENOTSUPP from
> rzv2m_pinctrl_pinconf_set().
>
> rzv2m_pinctrl_pinconf_group_get() is used when dumping pinctrl
> configuration. pinconf_generic_dump_one(), which calls it, makes
> exceptions for the -EINVAL and -ENOTSUPP error codes. The documentation
> for struct pinconf_ops::pin_config_group_get states that it "should
> return -ENOTSUPP and -EINVAL using the same rules as pin_config_get()".
> The documentation for struct pinconf_ops::pin_config_get states:
>
> "get the config of a certain pin, if the requested config is not available
> on this controller this should return -ENOTSUPP and if it is available but
> disabled it should return -EINVAL".
>
> Return -ENOTSUPP for the unsupported pinctrl operation.
>
> Suggested-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>

Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
i.e. will queue in renesas-devel for v7.2.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds