From: Lee Jones <lee@kernel.org>
To: lee@kernel.org, "James Tai" <james.tai@realtek.com>,
"Yu-Chun Lin" <eleanor.lin@realtek.com>,
"Andreas Färber" <afaerber@suse.com>,
"Linus Walleij" <linusw@kernel.org>,
"Tzuyi Chang" <tychang@realtek.com>,
linux-arm-kernel@lists.infradead.org,
linux-realtek-soc@lists.infradead.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: [PATCH 10/10] pinctrl: realtek: rtd1625: Set dcycle_offset to NA for pins without duty-cycle support
Date: Wed, 11 Nov 2026 21:51:55 +0000 [thread overview]
Message-ID: <20261111215256.1982044-11-lee@kernel.org> (raw)
In-Reply-To: <20261111215256.1982044-1-lee@kernel.org>
In rtd1625_main2_sconfigs[], pins gpio_86 through gpio_91 do not support
clock duty-cycle adjustment (dcycle_maskbits is 0), but specify 0
instead of NA for dcycle_offset. Because rtd_pconf_parse_conf() tests
sconfig_desc->dcycle_offset == NA to determine whether duty-cycle
configuration is supported, an offset of 0 causes it to compute
GENMASK(0 - 1, 0) and corrupt the pad control register.
Set dcycle_offset to NA for gpio_86 through gpio_91.
Fixes: e309dbd523b8 ("pinctrl: realtek: add rtd1625 pinctrl driver")
Closes: https://sashiko.dev/#/bug/linux-8a8f690f-15e7-4dbd-a3a2-87bc00edf7b9
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/pinctrl/realtek/pinctrl-rtd1625.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/pinctrl/realtek/pinctrl-rtd1625.c b/drivers/pinctrl/realtek/pinctrl-rtd1625.c
index 88f2be37f743..f6e038e4bbdd 100644
--- a/drivers/pinctrl/realtek/pinctrl-rtd1625.c
+++ b/drivers/pinctrl/realtek/pinctrl-rtd1625.c
@@ -2993,12 +2993,12 @@ static const struct rtd_pin_sconfig_desc rtd1625_main2_sconfigs[] = {
RTK_PIN_SCONFIG(gpio_65, 0x34, 16, 3, 19, 3, 22, 3),
RTK_PIN_SCONFIG(gpio_66, 0x38, 3, 3, 6, 3, 9, 3),
RTK_PIN_SCONFIG(gpio_67, 0x38, 16, 3, 19, 3, 22, 3),
- RTK_PIN_SCONFIG(gpio_86, 0x3c, 0, 0, 14, 4, 18, 4),
- RTK_PIN_SCONFIG(gpio_87, 0x3c, 0, 0, 24, 4, 28, 4),
- RTK_PIN_SCONFIG(gpio_88, 0x40, 0, 0, 2, 4, 6, 4),
- RTK_PIN_SCONFIG(gpio_89, 0x40, 0, 0, 12, 4, 16, 4),
- RTK_PIN_SCONFIG(gpio_90, 0x40, 0, 0, 22, 4, 26, 4),
- RTK_PIN_SCONFIG(gpio_91, 0x44, 0, 0, 2, 4, 6, 4),
+ RTK_PIN_SCONFIG(gpio_86, 0x3c, NA, 0, 14, 4, 18, 4),
+ RTK_PIN_SCONFIG(gpio_87, 0x3c, NA, 0, 24, 4, 28, 4),
+ RTK_PIN_SCONFIG(gpio_88, 0x40, NA, 0, 2, 4, 6, 4),
+ RTK_PIN_SCONFIG(gpio_89, 0x40, NA, 0, 12, 4, 16, 4),
+ RTK_PIN_SCONFIG(gpio_90, 0x40, NA, 0, 22, 4, 26, 4),
+ RTK_PIN_SCONFIG(gpio_91, 0x44, NA, 0, 2, 4, 6, 4),
RTK_PIN_SCONFIG(hif_clk, 0x44, 13, 3, 16, 3, 19, 3),
RTK_PIN_SCONFIG(hif_data, 0x48, 3, 3, 6, 3, 9, 3),
RTK_PIN_SCONFIG(hif_en, 0x48, 16, 3, 19, 3, 22, 3),
--
2.56.0.567.gdb80ae8cd5-goog
next prev parent reply other threads:[~2026-11-11 21:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 21:51 [PATCH 00/10] pinctrl: Fix resource leaks, out-of-bounds accesses, and error handling (batch 2) Lee Jones
2026-11-11 21:51 ` [PATCH 01/10] pinctrl: nuvoton: ma35: Unmap reg_base and release clock on probe error Lee Jones
2026-11-11 21:51 ` [PATCH 02/10] pinctrl: nuvoton: ma35: Prevent out-of-bounds write in ma35_pinctrl_get_soc_data() Lee Jones
2026-11-11 22:31 ` sashiko-bot
2026-11-11 21:51 ` [PATCH 03/10] pinctrl: nuvoton: ma35: Assign fwnode to gpio_chip in ma35_gpiolib_register() Lee Jones
2026-11-11 21:51 ` [PATCH 04/10] pinctrl: nuvoton: ma35: Avoid leaking map when parent node is missing Lee Jones
2026-11-11 22:34 ` sashiko-bot
2026-11-11 21:51 ` [PATCH 05/10] pinctrl: nuvoton: npcm8xx: Propagate npcm8xx_gpio_register() error in probe Lee Jones
2026-11-11 22:32 ` sashiko-bot
2026-11-11 21:51 ` [PATCH 06/10] pinctrl: nuvoton: npcm7xx: Fix fwnode_irq_get() error check in npcm7xx_gpio_of() Lee Jones
2026-11-11 21:51 ` [PATCH 07/10] pinctrl: single: Reject invalid register width in pcs_probe() Lee Jones
2026-11-11 21:51 ` [PATCH 08/10] pinctrl: single: Free pinconf settings array in pcs_dt_free_map() Lee Jones
2026-11-11 21:51 ` [PATCH 09/10] pinctrl: sunplus: Validate pin_func index in sppctl_dt_node_to_map() Lee Jones
2026-11-12 6:27 ` Andrew Gaylard
2026-11-11 21:51 ` Lee Jones [this message]
2026-11-12 8:55 ` [PATCH 10/10] pinctrl: realtek: rtd1625: Set dcycle_offset to NA for pins without duty-cycle support Yu-Chun Lin [林祐君]
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=20261111215256.1982044-11-lee@kernel.org \
--to=lee@kernel.org \
--cc=afaerber@suse.com \
--cc=eleanor.lin@realtek.com \
--cc=james.tai@realtek.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.