Skip to contentSkip to conversation

pinctrl: PINCTRL_STMFX should depend on CONFIG_OF

PATCH In review Timur Tabi 2 participants 2 messages Jun 2 – Jun 8

Subsystems (2)
lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

PATCH 1/1 pinctrl: PINCTRL_STMFX should depend on CONFIG_OF

Commit e785c990adcc ("pinctrl: Kconfig: drop unneeded dependencies on OF_GPIO") removed a redundant dependecy on CONFIG_OF_GPIO for several pinctrl drivers, but this change also removed a dependency on CONFIG_OF for some of those drivers.

Normally, this wouldn't be a problem, but PINCTRL_STMFX also selected MFD_STMFX, which does depend on CONFIG_OF. This conflict allows MFD_STMFX to be enabled even if CONFIG_OF is disabled.

Fix this by also having PINCTRL_STMFX depend on CONFIG_OF. This is okay because the pinctrl-stmfx driver actually does depend on CONFIG_OF functions.

Fixes e785c990adcc ("pinctrl: Kconfig: drop unneeded dependencies on OF_GPIO")
---
 drivers/pinctrl/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/pinctrl/Kconfig +1 -0
index 03f2e3ee065f..75131b6e6eea 100644
@@ -548,6 +548,7 @@ config PINCTRL_ST
 
 config PINCTRL_STMFX
 	tristate "STMicroelectronics STMFX GPIO expander pinctrl driver"
+	depends on OF
 	depends on I2C
 	depends on HAS_IOMEM
 	select GENERIC_PINCONF
Signature · 1 line
2.54.0
maintainer
#1 lore raw
Quoted 9 lines · Timur Tabi

Commit e785c990adcc ("pinctrl: Kconfig: drop unneeded dependencies on OF_GPIO") removed a redundant dependecy on CONFIG_OF_GPIO for several pinctrl drivers, but this change also removed a dependency on CONFIG_OF for some of those drivers.

Normally, this wouldn't be a problem, but PINCTRL_STMFX also selected MFD_STMFX, which does depend on CONFIG_OF. This conflict allows MFD_STMFX to be enabled even if CONFIG_OF is disabled.

Quoted 6 lines

Fix this by also having PINCTRL_STMFX depend on CONFIG_OF. This is okay because the pinctrl-stmfx driver actually does depend on CONFIG_OF functions.

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

Patch applied.

Yours,
Linus Walleij