Re: [PATCH] pinctrl: renesas: rzg2l: Add GPIO set_config
From: claudiu beznea
Date: Mon Mar 16 2026 - 06:20:33 EST
Hi, Geert,
On 3/13/26 15:15, Geert Uytterhoeven wrote:
Hi Claudiu,
On Wed, 18 Feb 2026 at 16:19, Claudiu <claudiu.beznea@xxxxxxxxx> wrote:
From: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
Add GPIO set_config to allow setting GPIO specific functionalities.
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
Thanks for your patch!
--- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
@@ -1848,6 +1848,25 @@ static void rzg2l_gpio_free(struct gpio_chip *chip, unsigned int offset)
rzg2l_gpio_direction_input(chip, offset);
}
+static int rzg2l_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
+ unsigned long config)
+{
+ switch (pinconf_to_config_param(config)) {
+ case PIN_CONFIG_BIAS_DISABLE:
+ case PIN_CONFIG_BIAS_PULL_UP:
+ case PIN_CONFIG_BIAS_PULL_DOWN:
+ case PIN_CONFIG_DRIVE_OPEN_DRAIN:
+ case PIN_CONFIG_DRIVE_PUSH_PULL:
+ case PIN_CONFIG_SLEW_RATE:
+ case PIN_CONFIG_DRIVE_STRENGTH:
+ case PIN_CONFIG_DRIVE_STRENGTH_UA:
+ case PIN_CONFIG_POWER_SOURCE:
Shouldn't you handle all types that are supported by
rzg2l_pinctrl_pinconf_[gs]et()?
The following are missing:
PIN_CONFIG_INPUT_ENABLE
PIN_CONFIG_OUTPUT_ENABLE
PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS
PIN_CONFIG_INPUT_SCHMITT_ENABLE
RENESAS_RZV2H_PIN_CONFIG_OUTPUT_IMPEDANCE
I'll add these as well.
Thank you for your review,
Claudiu