summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-11-20 02:45:15 +0300
committerTom Rini <trini@konsulko.com>2022-12-06 00:07:12 +0300
commitd9feb83505b3a7c06487a1748db4f20ad189e33a (patch)
treea0da4b46d0d4b2ec1a8da2afc607cbbcc3dd57c0 /drivers
parent022dc9e505ea70ea5e5c81f78a629a6016d4fd9d (diff)
downloadu-boot-d9feb83505b3a7c06487a1748db4f20ad189e33a.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/Kconfig21
-rw-r--r--drivers/power/pmic/Kconfig27
-rw-r--r--drivers/power/pmic/Makefile7
-rw-r--r--drivers/power/power_fsl.c2
4 files changed, 52 insertions, 5 deletions
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index bc47cf144d..5dbcde333b 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -430,6 +430,10 @@ config PALMAS_POWER
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 @@ config POWER_I2C
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 @@ config SPL_POWER_I2C
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 d30bb4d4e9..d94048db5f 100644
--- a/drivers/power/pmic/Kconfig
+++ b/drivers/power/pmic/Kconfig
@@ -393,8 +393,35 @@ config PMIC_TPS65217
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 e78dc1e205..c3180c5820 100644
--- a/drivers/power/pmic/Makefile
+++ b/drivers/power/pmic/Makefile
@@ -33,6 +33,7 @@ obj-$(CONFIG_PMIC_STPMIC1) += stpmic1.o
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_MUIC_MAX8997) += muic_max8997.o
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 7180b5127a..9bb7e39f2c 100644
--- a/drivers/power/power_fsl.c
+++ b/drivers/power/power_fsl.c
@@ -49,8 +49,6 @@ int pmic_init(unsigned char bus)
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;