diff mbox series

[01/38] power: pmic: Guard non-DM_PMIC drivers with a check for POWER_LEGACY

Message ID 20221119234545.404563-1-trini@konsulko.com
State Accepted
Commit 518c5dfab0e378891088edce07bde732882b8f1f
Delegated to: Tom Rini
Headers show
Series [01/38] power: pmic: Guard non-DM_PMIC drivers with a check for POWER_LEGACY | expand

Commit Message

Tom Rini Nov. 19, 2022, 11:45 p.m. UTC
As we have more legacy PMIC drivers to move to Kconfig, guard them all
with POWER_LEGACY or SPL_POWER_LEGACY. Do the same kind of check for
building the drivers too. This also means that we need to resort the
list slightly in the Makefile.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 drivers/power/pmic/Kconfig  |  5 ++++-
 drivers/power/pmic/Makefile | 10 ++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)

Comments

Simon Glass Nov. 21, 2022, 10:51 p.m. UTC | #1
On Sat, 19 Nov 2022 at 16:45, Tom Rini <trini@konsulko.com> wrote:
>
> As we have more legacy PMIC drivers to move to Kconfig, guard them all
> with POWER_LEGACY or SPL_POWER_LEGACY. Do the same kind of check for
> building the drivers too. This also means that we need to resort the
> list slightly in the Makefile.
>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>  drivers/power/pmic/Kconfig  |  5 ++++-
>  drivers/power/pmic/Makefile | 10 ++++++----
>  2 files changed, 10 insertions(+), 5 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini Dec. 6, 2022, 2:06 a.m. UTC | #2
On Sat, Nov 19, 2022 at 06:45:08PM -0500, Tom Rini wrote:

> As we have more legacy PMIC drivers to move to Kconfig, guard them all
> with POWER_LEGACY or SPL_POWER_LEGACY. Do the same kind of check for
> building the drivers too. This also means that we need to resort the
> list slightly in the Makefile.
> 
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

For the series, applied to u-boot/next, thanks!
diff mbox series

Patch

diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig
index 628d3a94bcba..d30bb4d4e9cc 100644
--- a/drivers/power/pmic/Kconfig
+++ b/drivers/power/pmic/Kconfig
@@ -393,10 +393,13 @@  config PMIC_TPS65217
 	only, and you can enable the regulator/charger drivers separately if
 	required.
 
+if POWER_LEGACY || SPL_POWER_LEGACY
+
 config POWER_MC34VR500
 	bool "Enable driver for Freescale MC34VR500 PMIC"
-	depends on !DM_PMIC
 	---help---
 	The MC34VR500 is used in conjunction with the FSL T1 and LS1 series
 	SoC. It provides 4 buck DC-DC convertors and 5 LDOs, and it is accessed
 	via an I2C interface.
+
+endif
diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile
index 58c6507c58c3..e78dc1e20535 100644
--- a/drivers/power/pmic/Makefile
+++ b/drivers/power/pmic/Makefile
@@ -30,17 +30,19 @@  obj-$(CONFIG_$(SPL_)PMIC_PALMAS) += palmas.o
 obj-$(CONFIG_$(SPL_)PMIC_LP873X) += lp873x.o
 obj-$(CONFIG_$(SPL_)PMIC_LP87565) += lp87565.o
 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
 
+ifeq ($(CONFIG_$(SPL_)POWER_LEGACY),y)
 obj-$(CONFIG_POWER_LTC3676) += pmic_ltc3676.o
 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_PMIC_TPS65217) += pmic_tps65217.o
-obj-$(CONFIG_POWER_TPS65218) += pmic_tps62362.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
-obj-$(CONFIG_PMIC_TPS65941) += tps65941.o
-obj-$(CONFIG_PMIC_TPS65219) += tps65219.o
+endif