Convert CONFIG_POWER_LTC3676 et al to Kconfig
This converts the following to Kconfig:
CONFIG_POWER_FSL
CONFIG_POWER_FSL_MC13892
CONFIG_POWER_HI6553
CONFIG_POWER_LTC3676
CONFIG_POWER_PFUZE100
CONFIG_POWER_PFUZE3000
CONFIG_POWER_SPI
CONFIG_POWER_TPS65090_EC
CONFIG_POWER_TPS65218
CONFIG_POWER_TPS65910
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index bc47cf1..5dbcde3 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -430,6 +430,10 @@
bool "Palmas power support"
depends on OMAP54XX
+config POWER_FSL
+ bool "Power control (legacy) for Freescale / NXP platforms"
+ depends on POWER_LEGACY
+
config POWER_I2C
bool "I2C-based power control for legacy power"
depends on POWER_LEGACY
@@ -440,6 +444,10 @@
Not to be used for new designs and existing ones should be moved to
the new PMIC interface based on driver model.
+config POWER_SPI
+ bool "SPI-based power control for legacy power_fsl driver"
+ depends on POWER_FSL && !POWER_I2C
+
config SPL_POWER_I2C
bool "I2C-based power control for legacy power"
depends on SPL_POWER_LEGACY
@@ -451,4 +459,17 @@
Not to be used for new designs and existing ones should be moved to
the new PMIC interface based on driver model.
+choice
+ prompt "PMIC chip"
+ default POWER_FSL_MC13892
+ depends on POWER_FSL && POWER_I2C
+
+config POWER_FSL_MC13892
+ bool "MC13892"
+
+config POWER_FSL_MC34704
+ bool "MC34704"
+
+endchoice
+
endif
diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig
index d30bb4d..d94048d 100644
--- a/drivers/power/pmic/Kconfig
+++ b/drivers/power/pmic/Kconfig
@@ -393,8 +393,35 @@
only, and you can enable the regulator/charger drivers separately if
required.
+config POWER_TPS65218
+ bool "Enable legacy driver for TPS65218 PMIC"
+
+config POWER_TPS62362
+ bool "Enable legacy driver for TPS62362 PMIC"
+
+config SPL_POWER_TPS62362
+ bool "Enable legacy driver for TPS62362 PMIC in SPL"
+ default y if POWER_TPS62362
+ depends on SPL
+
+config SPL_POWER_TPS65910
+ bool "Enable legacy driver for TPS65910 PMIC in SPL"
+ depends on SPL
+
if POWER_LEGACY || SPL_POWER_LEGACY
+config POWER_HI6553
+ bool "Enable legacy driver for HI6553 PMIC"
+
+config POWER_LTC3676
+ bool "Enable legacy driver for LTC3676 PMIC"
+
+config POWER_PFUZE100
+ bool "Enable legacy driver for PFUZE100 PMIC"
+
+config POWER_PFUZE3000
+ bool "Enable legacy driver for PFUZE3000 PMIC"
+
config POWER_MC34VR500
bool "Enable driver for Freescale MC34VR500 PMIC"
---help---
diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile
index e78dc1e..c3180c5 100644
--- a/drivers/power/pmic/Makefile
+++ b/drivers/power/pmic/Makefile
@@ -33,6 +33,7 @@
obj-$(CONFIG_PMIC_TPS65217) += pmic_tps65217.o
obj-$(CONFIG_PMIC_TPS65219) += tps65219.o
obj-$(CONFIG_PMIC_TPS65941) += tps65941.o
+obj-$(CONFIG_POWER_TPS65218) += pmic_tps65218.o
ifeq ($(CONFIG_$(SPL_)POWER_LEGACY),y)
obj-$(CONFIG_POWER_LTC3676) += pmic_ltc3676.o
@@ -40,9 +41,9 @@
obj-$(CONFIG_POWER_PCA9450) += pmic_pca9450.o
obj-$(CONFIG_POWER_PFUZE100) += pmic_pfuze100.o
obj-$(CONFIG_POWER_PFUZE3000) += pmic_pfuze3000.o
-obj-$(CONFIG_POWER_TPS62362) += pmic_tps62362.o
-obj-$(CONFIG_POWER_TPS65218) += pmic_tps65218.o
-obj-$(CONFIG_POWER_TPS65910) += pmic_tps65910.o
obj-$(CONFIG_POWER_HI6553) += pmic_hi6553.o
obj-$(CONFIG_POWER_MC34VR500) += pmic_mc34vr500.o
endif
+
+obj-$(CONFIG_$(SPL_)POWER_TPS62362) += pmic_tps62362.o
+obj-$(CONFIG_SPL_POWER_TPS65910) += pmic_tps65910.o
diff --git a/drivers/power/power_fsl.c b/drivers/power/power_fsl.c
index 7180b51..9bb7e39 100644
--- a/drivers/power/power_fsl.c
+++ b/drivers/power/power_fsl.c
@@ -49,8 +49,6 @@
p->interface = PMIC_I2C;
p->hw.i2c.addr = CFG_SYS_FSL_PMIC_I2C_ADDR;
p->hw.i2c.tx_num = FSL_PMIC_I2C_LENGTH;
-#else
-#error "You must select CONFIG_POWER_SPI or CONFIG_POWER_I2C"
#endif
return 0;