Skip to contentSkip to conversation

pinctrl: stmfx: fix mfd dependency

PATCH In review Arnd Bergmann 2 participants 4 messages Mar 12 – Mar 16

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

PATCH 1/2 pinctrl: stmfx: fix mfd dependency

From: Arnd Bergmann <[email protected]>

The PINCTRL_STMFX driver attempts to force-enable its MFD parent driver, which is really the wrong way around compared to general conventions. After the OF_GPIO dependency got dropped, this leads to a harmless but annoying build warning:

WARNING: unmet direct dependencies detected for MFD_STMFX
Depends on [n]: HAS_IOMEM [=y] && I2C [=y] && OF [=n] Selected by [m]:
- PINCTRL_STMFX [=m] && PINCTRL [=y] && I2C [=y] && HAS_IOMEM [=y]

Change the 'select' into a dependency instead. As this changes the defconfig behavior, also change the generic arm defconfig file to enable the other symbol instead.

Fixes e785c990adcc ("pinctrl: Kconfig: drop unneeded dependencies on OF_GPIO")
---
 drivers/pinctrl/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pinctrl/Kconfig +2 -1
index 03f2e3ee065f..51a2ddad2a48 100644
@@ -550,9 +550,10 @@ config PINCTRL_STMFX
 	tristate "STMicroelectronics STMFX GPIO expander pinctrl driver"
 	depends on I2C
 	depends on HAS_IOMEM
+	depends on MFD_STMFX
+	default MFD_STMFX
 	select GENERIC_PINCONF
 	select GPIOLIB_IRQCHIP
-	select MFD_STMFX
 	help
 	  Driver for STMicroelectronics Multi-Function eXpander (STMFX)
 	  GPIO expander.
Signature · 1 line
2.39.5
#1 lore raw

PATCH 2/2 ARM: defconfig: enable CONFIG_MFD_STMFX instead of PINCTRL_STMFX

From: Arnd Bergmann <[email protected]>

PINCTRL_STMFX now depends on MFD_STMFX instead of selecting it, so adapt the defconfig to pick the right one again.

---
 arch/arm/configs/multi_v7_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/configs/multi_v7_defconfig +1 -1
index c102c4acdd8f..728b36ad3a08 100644
@@ -481,7 +481,6 @@ CONFIG_PINCTRL_MCP23S08=m
 CONFIG_PINCTRL_MICROCHIP_SGPIO=y
 CONFIG_PINCTRL_OCELOT=y
 CONFIG_PINCTRL_PALMAS=y
-CONFIG_PINCTRL_STMFX=y
 CONFIG_PINCTRL_OWL=y
 CONFIG_PINCTRL_S500=y
 CONFIG_PINCTRL_MSM=y
@@ -627,6 +626,7 @@ CONFIG_MFD_SPMI_PMIC=y
 CONFIG_MFD_RK8XX_I2C=y
 CONFIG_MFD_RN5T618=y
 CONFIG_MFD_SEC_I2C=y
+CONFIG_MFD_STMFX=y
 CONFIG_MFD_STMPE=y
 CONFIG_MFD_PALMAS=y
 CONFIG_MFD_TPS65090=y
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 1/2
#3 lore raw
In reply to Arnd Bergmann
Quoted 12 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The PINCTRL_STMFX driver attempts to force-enable its MFD parent driver, which is really the wrong way around compared to general conventions. After the OF_GPIO dependency got dropped, this leads to a harmless but annoying build warning:

WARNING: unmet direct dependencies detected for MFD_STMFX
Depends on [n]: HAS_IOMEM [=y] && I2C [=y] && OF [=n] Selected by [m]:
- PINCTRL_STMFX [=m] && PINCTRL [=y] && I2C [=y] && HAS_IOMEM [=y]

Quoted 6 lines

Change the 'select' into a dependency instead. As this changes the defconfig behavior, also change the generic arm defconfig file to enable the other symbol instead.

Fixes e785c990adcc ("pinctrl: Kconfig: drop unneeded dependencies on OF_GPIO")

Yours,
Linus Walleij