Re: [PATCH 2/3] pinctrl: renesas: rzg2l: Add support for configuring open-drain outputs
From: Geert Uytterhoeven
Date: Fri Oct 04 2024 - 03:57:07 EST
Hi Prabhakar,
On Wed, Sep 18, 2024 at 2:09 PM Prabhakar <prabhakar.csengg@xxxxxxxxx> wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
>
> Add support for configuring the multiplexed pins as open-drain outputs.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
Thanks for your patch!
> --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
> +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
> @@ -1466,6 +1477,13 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev,
> rzg2l_rmw_pin_config(pctrl, IOLH(off), bit, IOLH_MASK, index);
> break;
>
> + case PIN_CONFIG_DRIVE_OPEN_DRAIN:
> + if (!(cfg & PIN_CFG_NOD))
> + return -EINVAL;
> +
> + rzg2l_rmw_pin_config(pctrl, NOD(off), bit, NOD_MASK, 1);
> + break;
> +
I think you also need a case for PIN_CONFIG_DRIVE_PUSH_PULL,
so you can disable the NOD bit again.
> case RENESAS_RZV2H_PIN_CONFIG_OUTPUT_IMPEDANCE:
> if (!(cfg & PIN_CFG_IOLH_RZV2H))
> return -EINVAL;
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