From: "Yu-Chun Lin [林祐君]" <eleanor.lin@realtek.com>
To: "Lee Jones" <lee@kernel.org>,
"James Tai [戴志峰]" <james.tai@realtek.com>,
"Andreas Färber" <afaerber@suse.com>,
"Linus Walleij" <linusw@kernel.org>,
"TY_Chang[張子逸]" <tychang@realtek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-realtek-soc@lists.infradead.org"
<linux-realtek-soc@lists.infradead.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH 06/10] pinctrl: realtek: Fix bit shift when configuring RTD_HIGH_VIL
Date: Wed, 4 Nov 2026 06:06:24 +0000 [thread overview]
Message-ID: <e7944214d9394aaf80d64c7e394f0232@realtek.com> (raw)
In-Reply-To: <20261103213002.1673560-7-lee@kernel.org>
> 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@vger.kernel.org
> Signed-off-by: Lee Jones <lee@kernel.org>
Reviewed-by: Yu-Chun Lin <eleanor.lin@realtek.com>
> ---
> 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
next prev parent reply other threads:[~2026-11-04 6:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 21:29 [PATCH 00/10] pinctrl: Fix out-of-bounds accesses, divide-by-zero, and error handling Lee Jones
2026-11-03 21:29 ` [PATCH 01/10] pinctrl: sunxi: Fix out-of-bounds irq_bank index when first bank has no IRQs Lee Jones
2026-11-03 21:29 ` [PATCH 04/10] pinctrl: mediatek: mt7981: Add missing entries to mt7981_ant_sel_funcs Lee Jones
2026-11-03 21:29 ` [PATCH 05/10] pinctrl: realtek: Prevent out-of-bounds access in rtd_pinctrl_find_config() Lee Jones
2026-11-04 6:04 ` Yu-Chun Lin [林祐君]
2026-11-03 21:29 ` [PATCH 06/10] pinctrl: realtek: Fix bit shift when configuring RTD_HIGH_VIL Lee Jones
2026-11-04 6:06 ` Yu-Chun Lin [林祐君] [this message]
2026-11-03 21:29 ` [PATCH 07/10] pinctrl: realtek: Initialise omitted offset fields to NA in config macros Lee Jones
2026-11-04 6:07 ` Yu-Chun Lin [林祐君]
2026-11-03 21:29 ` [PATCH 08/10] pinctrl: mediatek: Clean up partially initialised hw->eint on error Lee Jones
2026-11-03 21:29 ` [PATCH 09/10] pinctrl: mediatek: Prevent divide-by-zero for pins with fixed drive strength Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e7944214d9394aaf80d64c7e394f0232@realtek.com \
--to=eleanor.lin@realtek.com \
--cc=afaerber@suse.com \
--cc=james.tai@realtek.com \
--cc=lee@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-realtek-soc@lists.infradead.org \
--cc=stable@vger.kernel.org \
--cc=tychang@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox