From: "Heiko Stübner" <heiko@sntech.de>
To: Linus Walleij <linusw@kernel.org>,
Ye Zhang <ye.zhang@rock-chips.com>,
linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
Anton Protopopov <a.s.protopopov@gmail.com>
Cc: Anton Protopopov <a.s.protopopov@gmail.com>,
Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH] pinctrl: rockchip: Check the error of the pmu syscon lookup
Date: Tue, 01 Dec 2026 13:13:46 +0100 [thread overview]
Message-ID: <wdRXf87OSnWP0lH-2JSgAw@sntech.de> (raw)
In-Reply-To: <20261201113351.342509-1-a.s.protopopov@gmail.com>
Am Dienstag, 1. Dezember 2026, 12:33:49 Mitteleuropäische Normalzeit schrieb Anton Protopopov:
> The syscon_regmap_lookup_by_phandle_optional() function returns NULL
> only when the property is missing (-ENODEV). On other errors it
> returns an error pointer. Before commit dbd2317d7b9f ("pinctrl:
> rockchip: Add rk3506 pinctrl support") the probe returned the error
> of the "rockchip,pmu" lookup. Now it stores the error pointer in
> info->regmap_pmu. The pin configuration code then uses an error
> pointer as a regmap, which leads to an oops.
>
> The lookup may fail with a correct device tree too: it returns
> -EPROBE_DEFER when the hwspinlock of the syscon or the driver which
> registers its regmap is not probed yet. Return the error from the
> probe, so that it is retried.
>
> Fixes: dbd2317d7b9f ("pinctrl: rockchip: Add rk3506 pinctrl support")
> Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
> Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Looked up the behaviour of syscon_regmap_lookup_by_phandle_optional(),
so for the change itself:
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
(had a bit of fun, remembering that the 2nd syscon handling was removed
by commit 9884c330dd80 ("pinctrl: rockchip: Fix RK3506 pinctrl support") )
Thanks
Heiko
prev parent reply other threads:[~2026-12-01 12:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 11:33 Anton Protopopov
2026-12-01 12:13 ` Heiko Stübner [this message]
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=wdRXf87OSnWP0lH-2JSgAw@sntech.de \
--to=heiko@sntech.de \
--cc=a.s.protopopov@gmail.com \
--cc=bhelgaas@google.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-rockchip@lists.infradead.org \
--cc=ye.zhang@rock-chips.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
all inboxes | Powered by JetHome®