Skip to contentSkip to conversation

regulator: Kconfig works normally

PATCH In review David Brownell 2 participants 2 messages Nov 7, 2008 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: Kconfig works normally

From: David Brownell <[email protected]>

Fix dependencies in drivers/regulator/Kconfig: don't show *ANY* options unless regulator support is enabled. Also get rid of all the nasty reverse dependencies. This just switches over to use standard Kconfig idioms, making this tree act normally.

---
 drivers/regulator/Kconfig |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/regulator/Kconfig +4 -7
@@ -23,21 +23,20 @@ config REGULATOR
 
 	  If unsure, say no.
 
+if REGULATOR
+
 config REGULATOR_DEBUG
 	bool "Regulator debug support"
-	depends on REGULATOR
 	help
 	  Say yes here to enable debugging support.
 
 config REGULATOR_FIXED_VOLTAGE
 	tristate
 	default n
-	select REGULATOR
 
 config REGULATOR_VIRTUAL_CONSUMER
 	tristate "Virtual regulator consumer support"
 	default n
-	select REGULATOR
 	help
 	  This driver provides a virtual consumer for the voltage and
           current regulator API which provides sysfs controls for
@@ -49,7 +48,6 @@ config REGULATOR_VIRTUAL_CONSUMER
 config REGULATOR_BQ24022
 	tristate "TI bq24022 Dual Input 1-Cell Li-Ion Charger IC"
 	default n
-	select REGULATOR
 	help
 	  This driver controls a TI bq24022 Charger attached via
 	  GPIOs. The provided current regulator can enable/disable
@@ -59,7 +57,6 @@ config REGULATOR_BQ24022
 config REGULATOR_WM8350
 	tristate "Wolfson Microelectroncis WM8350 AudioPlus PMIC"
 	depends on MFD_WM8350
-	select REGULATOR
 	help
 	  This driver provides support for the voltage and current regulators
           of the WM8350 AudioPlus PMIC.
@@ -67,7 +64,6 @@ config REGULATOR_WM8350
 config REGULATOR_WM8400
 	tristate "Wolfson Microelectroncis WM8400 AudioPlus PMIC"
 	depends on MFD_WM8400
-	select REGULATOR
 	help
 	  This driver provides support for the voltage regulators of the
 	  WM8400 AudioPlus PMIC.
@@ -75,9 +71,10 @@ config REGULATOR_WM8400
 config REGULATOR_DA903X
 	tristate "Support regulators on Dialog Semiconductor DA9030/DA9034 PMIC"
 	depends on PMIC_DA903X
-	select REGULATOR
 	help
 	  Say y here to support the BUCKs and LDOs regulators found on
 	  Dialog Semiconductor DA9030/DA9034 PMIC.
 
+endif
+
 endmenu
#1 lore raw
Quoted 6 lines · David Brownell

From: David Brownell <[email protected]>

Fix dependencies in drivers/regulator/Kconfig: don't show *ANY* options unless regulator support is enabled. Also get rid of all the nasty reverse dependencies. This just switches over to use standard Kconfig idioms, making this tree act normally.

Thanks, I got a very similar patch from Takashi a few days ago and applied to regulator for-linus. I'll do a pull request shortly.

Thanks

Liam