From: sashiko-bot@kernel.org
To: "Jonas Karlman" <jonas@kwiboo.se>
Cc: linux-gpio@vger.kernel.org
Subject: Re: [PATCH] pinctrl: rockchip: Fix RK3506 pinctrl support
Date: Thu, 19 Nov 2026 21:27:51 +0000 [thread overview]
Message-ID: <sashiko-outbox-224092@kernel.org> (raw)
In-Reply-To: <20261119211739.566874-1-jonas@kwiboo.se>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] pinctrl: rockchip: rk3506_pin_banks[0] retains unused
IOMUX_SOURCE_PMU flag
--
commit defa520e906abc538d7f2bc74fe878780b97ae35
Author: Jonas Karlman <jonas@kwiboo.se>
pinctrl: rockchip: Fix RK3506 pinctrl support
This commit updates RK3506 pinctrl to use per-bank rockchip,grf phandles
(bank->regmap_ioc) with a fallback to the top-level rockchip,grf
(info->regmap_base), removing the undocumented rockchip,ioc1 property.
> diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
> index b78be7dd5342f..563c3ffcfe4ab 100644
> --- a/drivers/pinctrl/pinctrl-rockchip.c
> +++ b/drivers/pinctrl/pinctrl-rockchip.c
[ ... ]
> @@ -2568,9 +2560,13 @@ static int rk3506_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank,
> struct rockchip_pinctrl *info = bank->drvdata;
> int ret = 0;
>
> + if (bank->regmap_ioc)
> + *regmap = bank->regmap_ioc;
> + else
> + *regmap = info->regmap_base;
> +
> switch (bank->bank_num) {
> case 0:
> - *regmap = info->regmap_pmu;
> if (pin_num > 24) {
> ret = -EINVAL;
> } else if (pin_num < 24) {
[Severity: Medium]
Should IOMUX_SOURCE_PMU also be dropped from rk3506_pin_banks[0]?
drivers/pinctrl/pinctrl-rockchip.c:rk3506_pin_banks[] {
PIN_BANK_IOMUX_FLAGS_OFFSET_DRV_FLAGS_PULL_FLAGS(0, 32, "gpio0",
IOMUX_WIDTH_4BIT | IOMUX_SOURCE_PMU,
IOMUX_WIDTH_4BIT | IOMUX_SOURCE_PMU,
IOMUX_WIDTH_4BIT | IOMUX_SOURCE_PMU,
IOMUX_WIDTH_2BIT | IOMUX_SOURCE_PMU,
...
}
Drive, pull and schmitt calculations for bank 0 now use bank->regmap_ioc
with a fallback to info->regmap_base, and rockchip,pmu is no longer
expected on the pinctrl node. However, IOMUX_SOURCE_PMU still makes
rockchip_get_mux() and rockchip_set_mux() default to info->regmap_pmu
before checking bank->regmap_ioc. If gpio0 lacks its own rockchip,grf
phandle (so bank->regmap_ioc is NULL) and rockchip,pmu is absent,
rockchip_get_mux() and rockchip_set_mux() pass a NULL regmap to
regmap_read() and regmap_update_bits(), causing a NULL pointer
dereference.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119211739.566874-1-jonas@kwiboo.se?part=1
next prev parent reply other threads:[~2026-11-19 21:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 21:17 [PATCH] pinctrl: rockchip: Fix RK3506 pinctrl support Jonas Karlman
2026-11-19 21:17 ` Jonas Karlman
2026-11-19 21:27 ` sashiko-bot [this message]
2026-11-19 21:40 ` Heiko Stübner
2026-11-19 21:40 ` Heiko Stübner
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=sashiko-outbox-224092@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=jonas@kwiboo.se \
--cc=linux-gpio@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.