From: Billy Tsai <billy_tsai@aspeedtech.com>
To: Tony Lindgren <tony@atomide.com>,
Haojian Zhuang <haojian.zhuang@linaro.org>,
Linus Walleij <linusw@kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-omap@vger.kernel.org>, <linux-gpio@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <andrew@codeconstruct.com.au>,
<BMC-SW@aspeedtech.com>, Billy Tsai <billy_tsai@aspeedtech.com>
Subject: [PATCH 2/3] pinctrl: single: Allow probe to continue if mem region busy
Date: Mon, 22 Dec 2025 20:04:27 +0800 [thread overview]
Message-ID: <20251222-upstream_pinctrl_single-v1-2-e4aaa4eeb936@aspeedtech.com> (raw)
In-Reply-To: <20251222-upstream_pinctrl_single-v1-0-e4aaa4eeb936@aspeedtech.com>
Skip exclusive memory region reservation failure during probe and
continue initialization with a warning. This enables support for
systems where the memory region may already be reserved, improving
probe robustness.
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
---
drivers/pinctrl/pinctrl-single.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 757c22cc09f3..e65ae737b4c5 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1910,13 +1910,13 @@ static int pcs_probe(struct platform_device *pdev)
pcs->res = devm_request_mem_region(pcs->dev, res->start,
resource_size(res), DRIVER_NAME);
- if (!pcs->res) {
- dev_err(pcs->dev, "could not get mem_region\n");
- return -EBUSY;
- }
+ if (!pcs->res)
+ dev_warn(pcs->dev, "mem_region busy, continuing without reservation\n");
+ else
+ res = pcs->res;
- pcs->size = resource_size(pcs->res);
- pcs->base = devm_ioremap(pcs->dev, pcs->res->start, pcs->size);
+ pcs->size = resource_size(res);
+ pcs->base = devm_ioremap(pcs->dev, res->start, pcs->size);
if (!pcs->base) {
dev_err(pcs->dev, "could not ioremap\n");
return -ENODEV;
--
2.34.1
next prev parent reply other threads:[~2025-12-22 12:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-22 12:04 [PATCH 0/3] pinctrl: single: bit-per-mux DT flexibility, probe robustness, and consistent pinconf offsets Billy Tsai
2025-12-22 12:04 ` [PATCH 1/3] pinctrl: single: add per-pin binding support for bit-per-mux Billy Tsai
2025-12-22 12:04 ` Billy Tsai [this message]
2025-12-22 12:04 ` [PATCH 3/3] pinctrl: single: unify pinconf offset mapping with pinmux Billy Tsai
2026-01-07 23:44 ` [PATCH 0/3] pinctrl: single: bit-per-mux DT flexibility, probe robustness, and consistent pinconf offsets Andrew Jeffery
2026-01-19 2:39 ` Billy Tsai
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=20251222-upstream_pinctrl_single-v1-2-e4aaa4eeb936@aspeedtech.com \
--to=billy_tsai@aspeedtech.com \
--cc=BMC-SW@aspeedtech.com \
--cc=andrew@codeconstruct.com.au \
--cc=haojian.zhuang@linaro.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-omap@vger.kernel.org \
--cc=tony@atomide.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