Skip to contentSkip to conversation

pinctrl: microchip-sgpio: add missing select REGMAP_MMIO

PATCH In review Benjamin Boortz 3 participants 4 messages Jul 19 – Jul 25

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 pinctrl: microchip-sgpio: add missing select REGMAP_MMIO

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:34:24: error: implicit declaration of function 'devm_regmap_init_mmio'

Found by randconfig testing on arm64; tinyconfig reproducer below.

Fixes 2afbbab45c26 ("pinctrl: microchip-sgpio: update to support regmap")

---
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(+)
drivers/pinctrl/Kconfig +1 -0
index c2cdd7b2c49b..23ea76dc6261 100644
@@ -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
Signature · 1 line
2.55.0
#1 lore raw
Quoted 7 lines · Benjamin Boortz

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:34:24: error: implicit declaration of function 'devm_regmap_init_mmio'

Quoted 7 lines

Found by randconfig testing on arm64; tinyconfig reproducer below.

Fixes 2afbbab45c26 ("pinctrl: microchip-sgpio: update to support regmap")

---

This is v2. It misses a changelog here.

No need to resend _this_ time, just reply to this query with what has been changed v1..v2.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 16 lines · Andy Shevchenko
Quoted 7 lines · Benjamin Boortz

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:34:24: error: implicit declaration of function 'devm_regmap_init_mmio'

Quoted 7 lines

Found by randconfig testing on arm64; tinyconfig reproducer below.

Fixes 2afbbab45c26 ("pinctrl: microchip-sgpio: update to support regmap")

---

Quoted 10 lines

This is v2. It misses a changelog here.

No need to resend _this_ time, just reply to this query with what has been changed v1..v2.

Signature · 2 lines
With Best Regards,
Andy Shevchenko

Changes in v2:
- Reduced error block to one most significant line
- Fixed Fixes: tag to 2afbbab45c26 ("pinctrl: microchip-sgpio: update to support regmap")
- Added Reviewed-by

BR,
Benni Boortz

maintainer
#3 lore raw
In reply to Benjamin Boortz
Quoted 5 lines · Benjamin Boortz

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:

Quoted 8 lines

include/linux/mfd/ocelot.h:34:24: error: implicit declaration of function 'devm_regmap_init_mmio'

Found by randconfig testing on arm64; tinyconfig reproducer below.

Fixes 2afbbab45c26 ("pinctrl: microchip-sgpio: update to support regmap")

Patch applied for fixes.

Yours,
Linus Walleij