RE: [PATCH 06/10] pinctrl: realtek: Fix bit shift when configuring RTD_HIGH_VIL

From: Yu-Chun Lin [林祐君]

Date: Wed Nov 04 2026 - 01:14:56 EST


> In rtd_pconf_parse_conf(), the RTD_HIGH_VIL case prepares mask as
> BIT(hvil_off) for regmap_update_bits(), but sets val = 1 without shifting it to
> hvil_off. Whenever hvil_off is non-zero,
> regmap_update_bits() masks val with BIT(hvil_off) and clears the high VIL bit
> instead of setting it.
>
> Set val to BIT(hvil_off) so that the target bit is set as intended.
>
> Fixes: dcc9334435b0 ("pinctrl: realtek: add support for slew rate, input voltage
> and high VIL")
> Closes:
> https://sashiko.dev/#/bug/linux-e7077311-3f30-4b77-844b-1447519d0c84
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Lee Jones <lee@xxxxxxxxxx>

Reviewed-by: Yu-Chun Lin <eleanor.lin@xxxxxxxxxxx>

> ---
> drivers/pinctrl/realtek/pinctrl-rtd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/realtek/pinctrl-rtd.c
> b/drivers/pinctrl/realtek/pinctrl-rtd.c
> index 2b877099ec85..72773600303b 100644
> --- a/drivers/pinctrl/realtek/pinctrl-rtd.c
> +++ b/drivers/pinctrl/realtek/pinctrl-rtd.c
> @@ -473,7 +473,7 @@ static int rtd_pconf_parse_conf(struct rtd_pinctrl
> *data,
> hvil_off = config_desc->base_bit +
> config_desc->hvil_offset;
> reg_off = config_desc->reg_offset;
> mask = BIT(hvil_off);
> - val = 1;
> + val = BIT(hvil_off);
> break;
>
> case RTD_DRIVE_STRENGTH_P:
> --
> 2.56.0.385.gac671c819a-goog