From: Benjamin Boortz <bennib@mailbox.org>
To: linusw@kernel.org, lee@kernel.org, vladimir.oltean@nxp.com,
colin.foster@in-advantage.com, andy.shevchenko@gmail.com
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Benjamin Boortz <bennib@mailbox.org>
Subject: [PATCH] pinctrl: microchip-sgpio: add missing select REGMAP_MMIO
Date: Sat, 18 Jul 2026 23:35:15 +0200 [thread overview]
Message-ID: <20260718213738.2470294-1-bennib@mailbox.org> (raw)
The driver calls ocelot_regmap_from_resource() via <linux/mfd/ocelot.h>,
which internally uses devm_regmap_init_mmio() and requires REGMAP_MMIO.
The Kconfig entry does not select REGMAP_MMIO, causing a build failure
when no other driver in the config happens to pull in REGMAP_MMIO:
include/linux/mfd/ocelot.h:19:51: warning: 'struct regmap_config'
declared inside parameter list will not be visible outside of this
definition or declaration
include/linux/mfd/ocelot.h:34:24: error: implicit declaration of
function 'devm_regmap_init_mmio'
drivers/pinctrl/pinctrl-microchip-sgpio.c:910:16: error: variable
'regmap_config' has initializer but incomplete type
drivers/pinctrl/pinctrl-microchip-sgpio.c:911:18: error: 'struct
regmap_config' has no member named 'reg_bits'
Found by randconfig testing on arm64; tinyconfig reproducer below.
Fixes: 68c873363a78 ("pinctrl: microchip-sgpio: add ability to be used in a non-mmio configuration")
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Boortz <bennib@mailbox.org>
---
Reproducer (tinyconfig, arm64, without patch):
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- tinyconfig
scripts/config --enable CONFIG_PINCTRL
scripts/config --enable CONFIG_GPIOLIB
scripts/config --enable CONFIG_PINCTRL_MICROCHIP_SGPIO
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- olddefconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
drivers/pinctrl/pinctrl-microchip-sgpio.o
-> CONFIG_REGMAP_MMIO absent, build fails as shown above.
drivers/pinctrl/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index c2cdd7b2c49b..23ea76dc6261 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -426,6 +426,7 @@ config PINCTRL_MICROCHIP_SGPIO
select GENERIC_PINCONF
select GENERIC_PINCTRL_GROUPS
select GENERIC_PINMUX_FUNCTIONS
+ select REGMAP_MMIO
help
Support for the serial GPIO interface used on Microsemi and
Microchip SoCs. By using a serial interface, the SIO
--
2.55.0
next reply other threads:[~2026-07-18 21:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-18 21:35 Benjamin Boortz [this message]
2026-07-19 8:09 ` [PATCH] pinctrl: microchip-sgpio: add missing select REGMAP_MMIO Andy Shevchenko
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=20260718213738.2470294-1-bennib@mailbox.org \
--to=bennib@mailbox.org \
--cc=andy.shevchenko@gmail.com \
--cc=colin.foster@in-advantage.com \
--cc=lee@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vladimir.oltean@nxp.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