* [PATCH v2 0/2] pinctrl: renesas: rzg2l: Populate GPIO set_config
@ 2026-05-15 12:40 Claudiu Beznea
2026-05-15 12:40 ` [PATCH v2 1/2] pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP Claudiu Beznea
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Claudiu Beznea @ 2026-05-15 12:40 UTC (permalink / raw)
To: geert+renesas, linusw, brgl, prabhakar.mahadev-lad.rj, biju.das.jz
Cc: claudiu.beznea, claudiu.beznea, linux-renesas-soc, linux-gpio,
linux-kernel, Claudiu Beznea
From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Hi,
Series populates the struct gpio_chip::set_config for the Renesas RZ/G2L
pinctrl driver.
Thank you,
Claudiu
Changes in v2:
- used gpiochip_generic_config()
- fixed the return code for unsupported operation which helped in using
the gpiochip_generic_config()
Claudiu Beznea (2):
pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP
pinctrl: renesas: rzg2l: Populate struct gpio_chip::set_config
drivers/pinctrl/renesas/pinctrl-rzg2l.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP
2026-05-15 12:40 [PATCH v2 0/2] pinctrl: renesas: rzg2l: Populate GPIO set_config Claudiu Beznea
@ 2026-05-15 12:40 ` Claudiu Beznea
2026-05-18 9:10 ` Bartosz Golaszewski
2026-05-22 9:11 ` Geert Uytterhoeven
2026-05-15 12:40 ` [PATCH v2 2/2] pinctrl: renesas: rzg2l: Populate struct gpio_chip::set_config Claudiu Beznea
2026-05-22 9:12 ` [PATCH v2 0/2] pinctrl: renesas: rzg2l: Populate GPIO set_config Geert Uytterhoeven
2 siblings, 2 replies; 9+ messages in thread
From: Claudiu Beznea @ 2026-05-15 12:40 UTC (permalink / raw)
To: geert+renesas, linusw, brgl, prabhakar.mahadev-lad.rj, biju.das.jz
Cc: claudiu.beznea, claudiu.beznea, linux-renesas-soc, linux-gpio,
linux-kernel, Claudiu Beznea, stable
From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
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.
Return -ENOTSUPP for the unsupported pinctrl operation.
Fixes: 560c633d378a ("pinctrl: renesas: rzg2l: Drop oen_read and oen_write callbacks")
Fixes: c4c4637eb57f ("pinctrl: renesas: Add RZ/G2L pin and gpio controller driver")
Cc: stable@vger.kernel.org
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---
Changes in v2:
- none, this patch is new
drivers/pinctrl/renesas/pinctrl-rzg2l.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
index a106e087c224..05a33655e6cc 100644
--- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
@@ -1281,7 +1281,7 @@ static int rzg2l_read_oen(struct rzg2l_pinctrl *pctrl, unsigned int _pin)
int bit;
if (!pctrl->data->pin_to_oen_bit)
- return -EOPNOTSUPP;
+ return -ENOTSUPP;
bit = pctrl->data->pin_to_oen_bit(pctrl, _pin);
if (bit < 0)
@@ -1323,7 +1323,7 @@ static int rzg2l_write_oen(struct rzg2l_pinctrl *pctrl, unsigned int _pin, u8 oe
u8 val;
if (!pctrl->data->pin_to_oen_bit)
- return -EOPNOTSUPP;
+ return -ENOTSUPP;
bit = pctrl->data->pin_to_oen_bit(pctrl, _pin);
if (bit < 0)
@@ -1754,7 +1754,7 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev,
break;
default:
- return -EOPNOTSUPP;
+ return -ENOTSUPP;
}
}
@@ -1837,7 +1837,7 @@ static int rzg2l_pinctrl_pinconf_group_get(struct pinctrl_dev *pctldev,
/* Check config matching between to pin */
if (i && prev_config != *config)
- return -EOPNOTSUPP;
+ return -ENOTSUPP;
prev_config = *config;
}
--
2.43.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] pinctrl: renesas: rzg2l: Populate struct gpio_chip::set_config
2026-05-15 12:40 [PATCH v2 0/2] pinctrl: renesas: rzg2l: Populate GPIO set_config Claudiu Beznea
2026-05-15 12:40 ` [PATCH v2 1/2] pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP Claudiu Beznea
@ 2026-05-15 12:40 ` Claudiu Beznea
2026-05-18 9:10 ` Bartosz Golaszewski
2026-05-22 9:12 ` Geert Uytterhoeven
2026-05-22 9:12 ` [PATCH v2 0/2] pinctrl: renesas: rzg2l: Populate GPIO set_config Geert Uytterhoeven
2 siblings, 2 replies; 9+ messages in thread
From: Claudiu Beznea @ 2026-05-15 12:40 UTC (permalink / raw)
To: geert+renesas, linusw, brgl, prabhakar.mahadev-lad.rj, biju.das.jz
Cc: claudiu.beznea, claudiu.beznea, linux-renesas-soc, linux-gpio,
linux-kernel, Claudiu Beznea
From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Populate struct gpio_chip::set_config to allow various GPIO settings.
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
---
Changes in v2:
- used gpiochip_generic_config()
drivers/pinctrl/renesas/pinctrl-rzg2l.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
index 05a33655e6cc..ac42093fc579 100644
--- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
@@ -3212,6 +3212,7 @@ static int rzg2l_gpio_register(struct rzg2l_pinctrl *pctrl)
chip->direction_output = rzg2l_gpio_direction_output;
chip->get = rzg2l_gpio_get;
chip->set = rzg2l_gpio_set;
+ chip->set_config = gpiochip_generic_config;
chip->label = name;
chip->parent = pctrl->dev;
chip->owner = THIS_MODULE;
--
2.43.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP
2026-05-15 12:40 ` [PATCH v2 1/2] pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP Claudiu Beznea
@ 2026-05-18 9:10 ` Bartosz Golaszewski
2026-05-22 9:11 ` Geert Uytterhoeven
1 sibling, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2026-05-18 9:10 UTC (permalink / raw)
To: Claudiu Beznea
Cc: claudiu.beznea, linux-renesas-soc, linux-gpio, linux-kernel,
Claudiu Beznea, stable, geert+renesas, linusw, brgl,
prabhakar.mahadev-lad.rj, biju.das.jz
On Fri, 15 May 2026 14:40:07 +0200, Claudiu Beznea
<claudiu.beznea@kernel.org> said:
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> 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.
>
> Return -ENOTSUPP for the unsupported pinctrl operation.
>
> Fixes: 560c633d378a ("pinctrl: renesas: rzg2l: Drop oen_read and oen_write callbacks")
> Fixes: c4c4637eb57f ("pinctrl: renesas: Add RZ/G2L pin and gpio controller driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> ---
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] pinctrl: renesas: rzg2l: Populate struct gpio_chip::set_config
2026-05-15 12:40 ` [PATCH v2 2/2] pinctrl: renesas: rzg2l: Populate struct gpio_chip::set_config Claudiu Beznea
@ 2026-05-18 9:10 ` Bartosz Golaszewski
2026-05-22 9:12 ` Geert Uytterhoeven
1 sibling, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2026-05-18 9:10 UTC (permalink / raw)
To: Claudiu Beznea
Cc: claudiu.beznea, linux-renesas-soc, linux-gpio, linux-kernel,
Claudiu Beznea, geert+renesas, linusw, brgl,
prabhakar.mahadev-lad.rj, biju.das.jz
On Fri, 15 May 2026 14:40:08 +0200, Claudiu Beznea
<claudiu.beznea@kernel.org> said:
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> Populate struct gpio_chip::set_config to allow various GPIO settings.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> ---
>
> Changes in v2:
> - used gpiochip_generic_config()
>
> drivers/pinctrl/renesas/pinctrl-rzg2l.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
> index 05a33655e6cc..ac42093fc579 100644
> --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
> +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
> @@ -3212,6 +3212,7 @@ static int rzg2l_gpio_register(struct rzg2l_pinctrl *pctrl)
> chip->direction_output = rzg2l_gpio_direction_output;
> chip->get = rzg2l_gpio_get;
> chip->set = rzg2l_gpio_set;
> + chip->set_config = gpiochip_generic_config;
> chip->label = name;
> chip->parent = pctrl->dev;
> chip->owner = THIS_MODULE;
> --
> 2.43.0
>
>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP
2026-05-15 12:40 ` [PATCH v2 1/2] pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP Claudiu Beznea
2026-05-18 9:10 ` Bartosz Golaszewski
@ 2026-05-22 9:11 ` Geert Uytterhoeven
2026-05-22 9:17 ` Claudiu Beznea
1 sibling, 1 reply; 9+ messages in thread
From: Geert Uytterhoeven @ 2026-05-22 9:11 UTC (permalink / raw)
To: Claudiu Beznea
Cc: linusw, brgl, prabhakar.mahadev-lad.rj, biju.das.jz,
claudiu.beznea, linux-renesas-soc, linux-gpio, linux-kernel,
Claudiu Beznea, stable
Hi Claudiu,
On Fri, 15 May 2026 at 14:40, Claudiu Beznea <claudiu.beznea@kernel.org> wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> 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.
>
> Return -ENOTSUPP for the unsupported pinctrl operation.
>
> Fixes: 560c633d378a ("pinctrl: renesas: rzg2l: Drop oen_read and oen_write callbacks")
> Fixes: c4c4637eb57f ("pinctrl: renesas: Add RZ/G2L pin and gpio controller driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Thanks for your patch!
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-pinctrl for v7.2.
I guess drivers/pinctrl/renesas/pinctrl-rzv2m.c needs a similar patch?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] pinctrl: renesas: rzg2l: Populate struct gpio_chip::set_config
2026-05-15 12:40 ` [PATCH v2 2/2] pinctrl: renesas: rzg2l: Populate struct gpio_chip::set_config Claudiu Beznea
2026-05-18 9:10 ` Bartosz Golaszewski
@ 2026-05-22 9:12 ` Geert Uytterhoeven
1 sibling, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2026-05-22 9:12 UTC (permalink / raw)
To: Claudiu Beznea
Cc: linusw, brgl, prabhakar.mahadev-lad.rj, biju.das.jz,
claudiu.beznea, linux-renesas-soc, linux-gpio, linux-kernel,
Claudiu Beznea
On Fri, 15 May 2026 at 14:40, Claudiu Beznea <claudiu.beznea@kernel.org> wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> Populate struct gpio_chip::set_config to allow various GPIO settings.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> ---
>
> Changes in v2:
> - used gpiochip_generic_config()
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-pinctrl for v7.2.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 0/2] pinctrl: renesas: rzg2l: Populate GPIO set_config
2026-05-15 12:40 [PATCH v2 0/2] pinctrl: renesas: rzg2l: Populate GPIO set_config Claudiu Beznea
2026-05-15 12:40 ` [PATCH v2 1/2] pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP Claudiu Beznea
2026-05-15 12:40 ` [PATCH v2 2/2] pinctrl: renesas: rzg2l: Populate struct gpio_chip::set_config Claudiu Beznea
@ 2026-05-22 9:12 ` Geert Uytterhoeven
2 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2026-05-22 9:12 UTC (permalink / raw)
To: Claudiu Beznea
Cc: geert+renesas, linusw, brgl, prabhakar.mahadev-lad.rj,
biju.das.jz, claudiu.beznea, linux-renesas-soc, linux-gpio,
linux-kernel, Claudiu Beznea
Hi Claudiu,
On Fri, 15 May 2026 at 14:40, Claudiu Beznea <claudiu.beznea@kernel.org> wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> Series populates the struct gpio_chip::set_config for the Renesas RZ/G2L
> pinctrl driver.
>
> Thank you,
> Claudiu
>
> Changes in v2:
> - used gpiochip_generic_config()
> - fixed the return code for unsupported operation which helped in using
> the gpiochip_generic_config()
Thanks, this doesn't regress on RZ/Five, so
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP
2026-05-22 9:11 ` Geert Uytterhoeven
@ 2026-05-22 9:17 ` Claudiu Beznea
0 siblings, 0 replies; 9+ messages in thread
From: Claudiu Beznea @ 2026-05-22 9:17 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linusw, brgl, prabhakar.mahadev-lad.rj, biju.das.jz,
claudiu.beznea, linux-renesas-soc, linux-gpio, linux-kernel,
Claudiu Beznea, stable
Hi, Geert,
On 5/22/26 12:11, Geert Uytterhoeven wrote:
> Hi Claudiu,
>
> On Fri, 15 May 2026 at 14:40, Claudiu Beznea <claudiu.beznea@kernel.org> wrote:
>> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>
>> 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.
>>
>> Return -ENOTSUPP for the unsupported pinctrl operation.
>>
>> Fixes: 560c633d378a ("pinctrl: renesas: rzg2l: Drop oen_read and oen_write callbacks")
>> Fixes: c4c4637eb57f ("pinctrl: renesas: Add RZ/G2L pin and gpio controller driver")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> Thanks for your patch!
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> i.e. will queue in renesas-pinctrl for v7.2.
>
> I guess drivers/pinctrl/renesas/pinctrl-rzv2m.c needs a similar patch?
Yes! I'll prepare and send one.
--
Thank you,
Claudiu
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-05-22 9:17 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-15 12:40 [PATCH v2 0/2] pinctrl: renesas: rzg2l: Populate GPIO set_config Claudiu Beznea
2026-05-15 12:40 ` [PATCH v2 1/2] pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP Claudiu Beznea
2026-05-18 9:10 ` Bartosz Golaszewski
2026-05-22 9:11 ` Geert Uytterhoeven
2026-05-22 9:17 ` Claudiu Beznea
2026-05-15 12:40 ` [PATCH v2 2/2] pinctrl: renesas: rzg2l: Populate struct gpio_chip::set_config Claudiu Beznea
2026-05-18 9:10 ` Bartosz Golaszewski
2026-05-22 9:12 ` Geert Uytterhoeven
2026-05-22 9:12 ` [PATCH v2 0/2] pinctrl: renesas: rzg2l: Populate GPIO set_config Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome