From: Julian Braha <julianbraha@gmail.com>
To: linux@armlinux.org.uk, dvorkin@tibbo.com, wellslutw@gmail.com,
linusw@kernel.org
Cc: arnd@arndb.de, afd@ti.com, aaro.koskinen@iki.fi,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
Julian Braha <julianbraha@gmail.com>
Subject: [PATCH] pinctrl: fix PINCTRL_SPPCTL=m
Date: Fri, 4 Sep 2026 13:18:25 +0100 [thread overview]
Message-ID: <20260904121825.43320-1-julianbraha@gmail.com> (raw)
The PINCTRL_SPPCTL option is defined as a tristate in Kconfig, and the
help text suggests that the user can build it as a module by setting to
'm'.
However, it cannot currently be set to 'm', because SOC_SP7021, the only
platform that supports it, is a bool option that uses 'select' on it.
To allow users to actually set PINCTRL_SPPCTL=m, let's remove the select
from the SOC_SP7021 option, and instead have PINCTRL_SPPCTL default to y
when SOC_SP7021=y, then users can configure PINCTRL_SPPCTL=m in the
kconfig frontend if desired.
Note that I have only compile-tested this change, since I do not have the
hardware to runtime-test it. Please advise if it would be better to change
PINCTRL_SPPCTL to 'bool' and remove the help text suggesting that it can
be set to 'm'.
This impossible tristate was detected by kconfirm, a static analysis tool
for Kconfig.
Fixes: aa74c44be19c ("pinctrl: Add driver for Sunplus SP7021")
Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
arch/arm/Kconfig.platforms | 1 -
drivers/pinctrl/sunplus/Kconfig | 3 ++-
drivers/pinctrl/sunplus/sppctl.c | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm/Kconfig.platforms b/arch/arm/Kconfig.platforms
index 2e118b65f93b..dc880addadc5 100644
--- a/arch/arm/Kconfig.platforms
+++ b/arch/arm/Kconfig.platforms
@@ -177,7 +177,6 @@ config SOC_SP7021
select ARM_GIC
select ARM_PSCI
select PINCTRL
- select PINCTRL_SPPCTL
select SERIAL_SUNPLUS if TTY
select SERIAL_SUNPLUS_CONSOLE if TTY
help
diff --git a/drivers/pinctrl/sunplus/Kconfig b/drivers/pinctrl/sunplus/Kconfig
index 69f82590f6d2..7719838b39b6 100644
--- a/drivers/pinctrl/sunplus/Kconfig
+++ b/drivers/pinctrl/sunplus/Kconfig
@@ -5,7 +5,8 @@
config PINCTRL_SPPCTL
tristate "Sunplus SP7021 PinMux and GPIO driver"
- depends on SOC_SP7021
+ default SOC_SP7021
+ depends on SOC_SP7021 || COMPILE_TEST
depends on OF && HAS_IOMEM
select GENERIC_PINCTRL_GROUPS
select GENERIC_PINMUX_FUNCTIONS
diff --git a/drivers/pinctrl/sunplus/sppctl.c b/drivers/pinctrl/sunplus/sppctl.c
index 67e036d66245..89c6e2e92f07 100644
--- a/drivers/pinctrl/sunplus/sppctl.c
+++ b/drivers/pinctrl/sunplus/sppctl.c
@@ -1113,6 +1113,7 @@ static const struct of_device_id sppctl_match_table[] = {
{ .compatible = "sunplus,sp7021-pctl" },
{ /* sentinel */ }
};
+MODULE_DEVICE_TABLE(of, sppctl_match_table);
static struct platform_driver sppctl_pinctrl_driver = {
.driver = {
@@ -1121,7 +1122,7 @@ static struct platform_driver sppctl_pinctrl_driver = {
},
.probe = sppctl_probe,
};
-builtin_platform_driver(sppctl_pinctrl_driver)
+module_platform_driver(sppctl_pinctrl_driver);
MODULE_AUTHOR("Dvorkin Dmitry <dvorkin@tibbo.com>");
MODULE_AUTHOR("Wells Lu <wellslutw@gmail.com>");
--
2.55.0
next reply other threads:[~2026-09-04 12:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 12:18 Julian Braha [this message]
2026-09-16 10:31 ` [PATCH] pinctrl: fix PINCTRL_SPPCTL=m Andrew Gaylard
-- strict thread matches above, loose matches on Subject: below --
2026-09-16 10:49 Andrew Gaylard
2026-09-20 22:23 ` Linus Walleij
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=20260904121825.43320-1-julianbraha@gmail.com \
--to=julianbraha@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=afd@ti.com \
--cc=arnd@arndb.de \
--cc=dvorkin@tibbo.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@armlinux.org.uk \
--cc=wellslutw@gmail.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.