aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--board/compulab/cl-som-imx7/cl-som-imx7.c4
-rw-r--r--board/freescale/imx8mp_evk/spl.c2
-rw-r--r--board/freescale/imx8mq_evk/spl.c2
-rw-r--r--board/samsung/common/board.c2
-rw-r--r--board/technexion/pico-imx7d/pico-imx7d.c2
-rw-r--r--board/tqc/tqma6/tqma6.c2
-rw-r--r--board/udoo/neo/neo.c2
-rw-r--r--configs/am43xx_evm_qspiboot_defconfig2
-rw-r--r--configs/cl-som-imx7_defconfig2
-rw-r--r--configs/cm_t43_defconfig2
-rw-r--r--configs/gwventana_emmc_defconfig2
-rw-r--r--configs/gwventana_gw5904_defconfig2
-rw-r--r--configs/gwventana_nand_defconfig2
-rw-r--r--configs/hikey_defconfig1
-rw-r--r--configs/imx8mp_evk_defconfig2
-rw-r--r--configs/imx8mq_evk_defconfig2
-rw-r--r--configs/imx8mq_phanbell_defconfig2
-rw-r--r--configs/ls1046ardb_emmc_defconfig2
-rw-r--r--configs/ls1046ardb_qspi_SECURE_BOOT_defconfig2
-rw-r--r--configs/ls1046ardb_qspi_defconfig2
-rw-r--r--configs/ls1046ardb_qspi_spl_defconfig2
-rw-r--r--configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig2
-rw-r--r--configs/ls1046ardb_sdcard_defconfig2
-rw-r--r--configs/ls1046ardb_tfa_SECURE_BOOT_defconfig2
-rw-r--r--configs/ls1046ardb_tfa_defconfig2
-rw-r--r--configs/mx51evk_defconfig1
-rw-r--r--configs/mx53loco_defconfig2
-rw-r--r--configs/mx6sabreauto_defconfig2
-rw-r--r--configs/mx6sabresd_defconfig2
-rw-r--r--configs/novena_defconfig2
-rw-r--r--configs/phycore-imx8mp_defconfig2
-rw-r--r--configs/pico-dwarf-imx7d_defconfig2
-rw-r--r--configs/pico-hobbit-imx7d_defconfig2
-rw-r--r--configs/pico-imx7d_bl33_defconfig2
-rw-r--r--configs/pico-imx7d_defconfig2
-rw-r--r--configs/pico-imx8mq_defconfig2
-rw-r--r--configs/pico-nymph-imx7d_defconfig2
-rw-r--r--configs/pico-pi-imx7d_defconfig2
-rw-r--r--configs/udoo_neo_defconfig2
-rw-r--r--configs/vining_2000_defconfig2
-rw-r--r--configs/warp_defconfig2
-rw-r--r--drivers/power/Kconfig50
-rw-r--r--drivers/power/Makefile4
-rw-r--r--include/configs/am43xx_evm.h4
-rw-r--r--include/configs/cl-som-imx7.h2
-rw-r--r--include/configs/cm_t43.h2
-rw-r--r--include/configs/el6x_common.h2
-rw-r--r--include/configs/gw_ventana.h2
-rw-r--r--include/configs/hikey.h1
-rw-r--r--include/configs/imx8mp_evk.h2
-rw-r--r--include/configs/imx8mq_evk.h2
-rw-r--r--include/configs/imx8mq_phanbell.h3
-rw-r--r--include/configs/ls1046ardb.h4
-rw-r--r--include/configs/mx51evk.h1
-rw-r--r--include/configs/mx53loco.h2
-rw-r--r--include/configs/mx6sabreauto.h2
-rw-r--r--include/configs/mx6sabresd.h2
-rw-r--r--include/configs/novena.h2
-rw-r--r--include/configs/phycore_imx8mp.h2
-rw-r--r--include/configs/pico-imx7d.h2
-rw-r--r--include/configs/pico-imx8mq.h3
-rw-r--r--include/configs/tqma6.h2
-rw-r--r--include/configs/udoo_neo.h2
-rw-r--r--include/configs/vining_2000.h2
-rw-r--r--include/configs/warp.h2
-rw-r--r--include/power/max77686_pmic.h2
-rw-r--r--include/power/pmic.h8
-rw-r--r--scripts/config_whitelist.txt2
68 files changed, 131 insertions, 65 deletions
diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c
index c54e02fdb44..3ee13352186 100644
--- a/board/compulab/cl-som-imx7/cl-som-imx7.c
+++ b/board/compulab/cl-som-imx7/cl-som-imx7.c
@@ -267,7 +267,7 @@ int board_init(void)
return 0;
}
-#ifdef CONFIG_POWER_LEGACY
+#if CONFIG_IS_ENABLED(POWER_LEGACY)
#define I2C_PMIC 0
int power_init_board(void)
{
@@ -293,7 +293,7 @@ int power_init_board(void)
return 0;
}
-#endif /* CONFIG_POWER_LEGACY */
+#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */
/*
* cl_som_imx7_setup_wdog() - watchdog configuration.
diff --git a/board/freescale/imx8mp_evk/spl.c b/board/freescale/imx8mp_evk/spl.c
index d317f212973..eca42c756e4 100644
--- a/board/freescale/imx8mp_evk/spl.c
+++ b/board/freescale/imx8mp_evk/spl.c
@@ -63,7 +63,7 @@ struct i2c_pads_info i2c_pad_info1 = {
},
};
-#ifdef CONFIG_POWER_LEGACY
+#if CONFIG_IS_ENABLED(POWER_LEGACY)
#define I2C_PMIC 0
int power_init_board(void)
{
diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c
index 6ee6230f748..67d069b2b05 100644
--- a/board/freescale/imx8mq_evk/spl.c
+++ b/board/freescale/imx8mq_evk/spl.c
@@ -156,7 +156,7 @@ int board_mmc_init(struct bd_info *bis)
return 0;
}
-#ifdef CONFIG_POWER_LEGACY
+#if CONFIG_IS_ENABLED(POWER_LEGACY)
#define I2C_PMIC 0
int power_init_board(void)
{
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 08f9202b711..97791aaeffe 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -185,7 +185,7 @@ int board_early_init_f(void)
}
#endif
-#if defined(CONFIG_POWER_LEGACY) || defined(CONFIG_DM_PMIC)
+#if CONFIG_IS_ENABLED(POWER_LEGACY) || CONFIG_IS_ENABLED(DM_PMIC)
int power_init_board(void)
{
set_ps_hold_ctrl();
diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c
index 81b1fb35122..d97e13b1cda 100644
--- a/board/technexion/pico-imx7d/pico-imx7d.c
+++ b/board/technexion/pico-imx7d/pico-imx7d.c
@@ -60,7 +60,7 @@ int dram_init(void)
return 0;
}
-#ifdef CONFIG_POWER_LEGACY
+#if CONFIG_IS_ENABLED(POWER_LEGACY)
#define I2C_PMIC 3
int power_init_board(void)
{
diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c
index f851e1948cf..de9c00174ae 100644
--- a/board/tqc/tqma6/tqma6.c
+++ b/board/tqc/tqma6/tqma6.c
@@ -247,7 +247,7 @@ static const char *tqma6_get_boardname(void)
};
}
-#ifdef CONFIG_POWER_LEGACY
+#if CONFIG_IS_ENABLED(POWER_LEGACY)
/* setup board specific PMIC */
int power_init_board(void)
{
diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index 88889df2d2f..ce005d31cc6 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -96,7 +96,7 @@ static struct i2c_pads_info i2c_pad_info1 = {
};
#endif
-#ifdef CONFIG_POWER_LEGACY
+#if CONFIG_IS_ENABLED(POWER_LEGACY)
int power_init_board(void)
{
struct pmic *p;
diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig
index 6c42cbb1d5c..ebb46d412f2 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -49,6 +49,8 @@ CONFIG_SF_DEFAULT_SPEED=48000000
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
+CONFIG_SPL_POWER_LEGACY=y
+CONFIG_SPL_POWER_I2C=y
CONFIG_SYS_NS16550=y
CONFIG_SPI=y
CONFIG_TI_QSPI=y
diff --git a/configs/cl-som-imx7_defconfig b/configs/cl-som-imx7_defconfig
index 850bfcf70cf..99c46853a82 100644
--- a/configs/cl-som-imx7_defconfig
+++ b/configs/cl-som-imx7_defconfig
@@ -82,7 +82,9 @@ CONFIG_SPI_FLASH_WINBOND=y
CONFIG_PHYLIB=y
CONFIG_PHY_ATHEROS=y
CONFIG_MII=y
+CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
+CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
diff --git a/configs/cm_t43_defconfig b/configs/cm_t43_defconfig
index 9faf1b863f3..18fbcf0e582 100644
--- a/configs/cm_t43_defconfig
+++ b/configs/cm_t43_defconfig
@@ -82,6 +82,8 @@ CONFIG_SPI_FLASH_WINBOND=y
CONFIG_PHY_ATHEROS=y
CONFIG_MII=y
CONFIG_DRIVER_TI_CPSW=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_DM_SERIAL=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig
index 45ff04bec53..d1074323daf 100644
--- a/configs/gwventana_emmc_defconfig
+++ b/configs/gwventana_emmc_defconfig
@@ -102,8 +102,10 @@ CONFIG_MII=y
CONFIG_PCI=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
+CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_POWER_I2C=y
CONFIG_CONS_INDEX=2
CONFIG_DM_SERIAL=y
CONFIG_MXC_UART=y
diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig
index 42a22f64976..f579d0fd8d1 100644
--- a/configs/gwventana_gw5904_defconfig
+++ b/configs/gwventana_gw5904_defconfig
@@ -106,8 +106,10 @@ CONFIG_MII=y
CONFIG_PCI=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
+CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_POWER_I2C=y
CONFIG_CONS_INDEX=2
CONFIG_DM_SERIAL=y
CONFIG_MXC_UART=y
diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig
index 784274b27dc..b587adefb52 100644
--- a/configs/gwventana_nand_defconfig
+++ b/configs/gwventana_nand_defconfig
@@ -108,8 +108,10 @@ CONFIG_MII=y
CONFIG_PCI=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
+CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_POWER_I2C=y
CONFIG_CONS_INDEX=2
CONFIG_DM_SERIAL=y
CONFIG_MXC_UART=y
diff --git a/configs/hikey_defconfig b/configs/hikey_defconfig
index bf8ac071a51..5d3d28d9319 100644
--- a/configs/hikey_defconfig
+++ b/configs/hikey_defconfig
@@ -26,6 +26,7 @@ CONFIG_SYS_MMC_ENV_PART=2
CONFIG_MMC_DW=y
CONFIG_MMC_DW_K3=y
CONFIG_DM_ETH=y
+CONFIG_POWER_LEGACY=y
CONFIG_CONS_INDEX=4
CONFIG_USB=y
CONFIG_USB_DWC2=y
diff --git a/configs/imx8mp_evk_defconfig b/configs/imx8mp_evk_defconfig
index 20a0a428dac..0abe1370273 100644
--- a/configs/imx8mp_evk_defconfig
+++ b/configs/imx8mp_evk_defconfig
@@ -81,9 +81,11 @@ CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_IMX8M=y
+CONFIG_SPL_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPL_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_SYSRESET=y
CONFIG_SPL_SYSRESET=y
diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig
index 083eba6b0ec..62fe6f15236 100644
--- a/configs/imx8mq_evk_defconfig
+++ b/configs/imx8mq_evk_defconfig
@@ -52,11 +52,13 @@ CONFIG_PHY=y
CONFIG_PHY_IMX8MQ_USB=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX8M=y
+CONFIG_SPL_POWER_LEGACY=y
CONFIG_POWER_DOMAIN=y
CONFIG_IMX8M_POWER_DOMAIN=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPL_POWER_I2C=y
CONFIG_DM_RESET=y
CONFIG_MXC_UART=y
CONFIG_DM_THERMAL=y
diff --git a/configs/imx8mq_phanbell_defconfig b/configs/imx8mq_phanbell_defconfig
index e5d5d9ee706..911c3391db5 100644
--- a/configs/imx8mq_phanbell_defconfig
+++ b/configs/imx8mq_phanbell_defconfig
@@ -54,11 +54,13 @@ CONFIG_FSL_USDHC=y
CONFIG_DM_ETH=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX8M=y
+CONFIG_SPL_POWER_LEGACY=y
CONFIG_POWER_DOMAIN=y
CONFIG_IMX8M_POWER_DOMAIN=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPL_POWER_I2C=y
CONFIG_DM_RESET=y
CONFIG_MXC_UART=y
CONFIG_DM_THERMAL=y
diff --git a/configs/ls1046ardb_emmc_defconfig b/configs/ls1046ardb_emmc_defconfig
index e79da63c9e1..e5402a24a64 100644
--- a/configs/ls1046ardb_emmc_defconfig
+++ b/configs/ls1046ardb_emmc_defconfig
@@ -83,6 +83,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y
diff --git a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
index bfaf8c7525f..cd9e3a46416 100644
--- a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
@@ -65,6 +65,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y
diff --git a/configs/ls1046ardb_qspi_defconfig b/configs/ls1046ardb_qspi_defconfig
index 36b812d22b8..93f0e88e3a1 100644
--- a/configs/ls1046ardb_qspi_defconfig
+++ b/configs/ls1046ardb_qspi_defconfig
@@ -69,6 +69,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y
diff --git a/configs/ls1046ardb_qspi_spl_defconfig b/configs/ls1046ardb_qspi_spl_defconfig
index 1df12b24286..a88baafd1e3 100644
--- a/configs/ls1046ardb_qspi_spl_defconfig
+++ b/configs/ls1046ardb_qspi_spl_defconfig
@@ -87,6 +87,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y
diff --git a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
index dabd60994ea..36b91a05fb1 100644
--- a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
@@ -81,6 +81,8 @@ CONFIG_FMAN_ENET=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
CONFIG_SYS_NS16550=y
CONFIG_SPI=y
diff --git a/configs/ls1046ardb_sdcard_defconfig b/configs/ls1046ardb_sdcard_defconfig
index 1e5ec897cd7..9ed24bb554c 100644
--- a/configs/ls1046ardb_sdcard_defconfig
+++ b/configs/ls1046ardb_sdcard_defconfig
@@ -81,6 +81,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y
diff --git a/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig b/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig
index 217dc7fe6ae..a14df4dc9f0 100644
--- a/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig
@@ -62,6 +62,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y
CONFIG_SPI=y
diff --git a/configs/ls1046ardb_tfa_defconfig b/configs/ls1046ardb_tfa_defconfig
index 445fad34b21..85491a37e46 100644
--- a/configs/ls1046ardb_tfa_defconfig
+++ b/configs/ls1046ardb_tfa_defconfig
@@ -68,6 +68,8 @@ CONFIG_NVME=y
CONFIG_PCI=y
CONFIG_PCIE_LAYERSCAPE_RC=y
CONFIG_PCIE_LAYERSCAPE_EP=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_DM_SCSI=y
CONFIG_SYS_NS16550=y
CONFIG_SPI=y
diff --git a/configs/mx51evk_defconfig b/configs/mx51evk_defconfig
index bc2dfde7ac3..f9ca4ee50af 100644
--- a/configs/mx51evk_defconfig
+++ b/configs/mx51evk_defconfig
@@ -42,6 +42,7 @@ CONFIG_FEC_MXC=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX5=y
+CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
diff --git a/configs/mx53loco_defconfig b/configs/mx53loco_defconfig
index 9bd0d77e8d5..04df33cdb2b 100644
--- a/configs/mx53loco_defconfig
+++ b/configs/mx53loco_defconfig
@@ -48,9 +48,11 @@ CONFIG_FEC_MXC=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX5=y
+CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_USB=y
CONFIG_USB_EHCI_MX5=y
diff --git a/configs/mx6sabreauto_defconfig b/configs/mx6sabreauto_defconfig
index 3be9064021e..4427079422e 100644
--- a/configs/mx6sabreauto_defconfig
+++ b/configs/mx6sabreauto_defconfig
@@ -90,7 +90,9 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
+CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
+CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
index 9431bffdc4a..5216bcaddea 100644
--- a/configs/mx6sabresd_defconfig
+++ b/configs/mx6sabresd_defconfig
@@ -99,8 +99,10 @@ CONFIG_MII=y
CONFIG_PCI=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
+CONFIG_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
diff --git a/configs/novena_defconfig b/configs/novena_defconfig
index 0770dd14000..81f1534926b 100644
--- a/configs/novena_defconfig
+++ b/configs/novena_defconfig
@@ -70,6 +70,8 @@ CONFIG_MII=y
CONFIG_PCI=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_DM_THERMAL=y
CONFIG_IMX_THERMAL=y
diff --git a/configs/phycore-imx8mp_defconfig b/configs/phycore-imx8mp_defconfig
index 7d2871351ac..f22798e2bb3 100644
--- a/configs/phycore-imx8mp_defconfig
+++ b/configs/phycore-imx8mp_defconfig
@@ -92,9 +92,11 @@ CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_IMX8M=y
+CONFIG_SPL_POWER_LEGACY=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPL_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_SYSRESET=y
CONFIG_SPL_SYSRESET=y
diff --git a/configs/pico-dwarf-imx7d_defconfig b/configs/pico-dwarf-imx7d_defconfig
index 7942d6f2a10..1be6605ae39 100644
--- a/configs/pico-dwarf-imx7d_defconfig
+++ b/configs/pico-dwarf-imx7d_defconfig
@@ -72,6 +72,8 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
CONFIG_USB=y
diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig
index a1851e1938c..a0c034c83b1 100644
--- a/configs/pico-hobbit-imx7d_defconfig
+++ b/configs/pico-hobbit-imx7d_defconfig
@@ -72,6 +72,8 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
CONFIG_USB=y
diff --git a/configs/pico-imx7d_bl33_defconfig b/configs/pico-imx7d_bl33_defconfig
index 096a04527cb..df81717a325 100644
--- a/configs/pico-imx7d_bl33_defconfig
+++ b/configs/pico-imx7d_bl33_defconfig
@@ -66,6 +66,8 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_CONS_INDEX=4
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig
index 4ba23a597cf..7d535625bf7 100644
--- a/configs/pico-imx7d_defconfig
+++ b/configs/pico-imx7d_defconfig
@@ -72,6 +72,8 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
CONFIG_USB=y
diff --git a/configs/pico-imx8mq_defconfig b/configs/pico-imx8mq_defconfig
index 5b1dc81feea..b90a4924247 100644
--- a/configs/pico-imx8mq_defconfig
+++ b/configs/pico-imx8mq_defconfig
@@ -52,11 +52,13 @@ CONFIG_FSL_USDHC=y
CONFIG_DM_ETH=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX8M=y
+CONFIG_SPL_POWER_LEGACY=y
CONFIG_POWER_DOMAIN=y
CONFIG_IMX8M_POWER_DOMAIN=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPL_POWER_I2C=y
CONFIG_DM_RESET=y
CONFIG_MXC_UART=y
CONFIG_DM_THERMAL=y
diff --git a/configs/pico-nymph-imx7d_defconfig b/configs/pico-nymph-imx7d_defconfig
index 7942d6f2a10..1be6605ae39 100644
--- a/configs/pico-nymph-imx7d_defconfig
+++ b/configs/pico-nymph-imx7d_defconfig
@@ -72,6 +72,8 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
CONFIG_USB=y
diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig
index 3f751410a7e..e0be1b0abc9 100644
--- a/configs/pico-pi-imx7d_defconfig
+++ b/configs/pico-pi-imx7d_defconfig
@@ -72,6 +72,8 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
CONFIG_USB=y
diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig
index 5c463ea771d..2f549b35759 100644
--- a/configs/udoo_neo_defconfig
+++ b/configs/udoo_neo_defconfig
@@ -50,5 +50,7 @@ CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_IMX_THERMAL=y
diff --git a/configs/vining_2000_defconfig b/configs/vining_2000_defconfig
index 8c79ff3aa61..24989ff2aa9 100644
--- a/configs/vining_2000_defconfig
+++ b/configs/vining_2000_defconfig
@@ -78,6 +78,8 @@ CONFIG_MII=y
CONFIG_PCI=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_PWM_IMX=y
CONFIG_DM_SERIAL=y
CONFIG_MXC_UART=y
diff --git a/configs/warp_defconfig b/configs/warp_defconfig
index 015a15312fe..3d6c67240f8 100644
--- a/configs/warp_defconfig
+++ b/configs/warp_defconfig
@@ -38,6 +38,8 @@ CONFIG_SYS_I2C_LEGACY=y
CONFIG_SYS_I2C_MXC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_POWER_LEGACY=y
+CONFIG_POWER_I2C=y
CONFIG_MXC_UART=y
CONFIG_USB=y
CONFIG_WATCHDOG_TIMEOUT_MSECS=30000
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 26257a72bc6..f5681c947e3 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -1,5 +1,34 @@
menu "Power"
+config POWER_LEGACY
+ bool "Legacy power support"
+ help
+ Note: This is a legacy option. Use DM_PMIC instead.
+
+ Enable support for power control in U-Boot. This includes support
+ for PMICs (Power-management Integrated Circuits) and some of the
+ features provided by PMICs. In particular, voltage regulators can
+ be used to enable/disable power and vary its voltage. That can be
+ useful in U-Boot to turn on boot peripherals and adjust CPU voltage
+ so that the clock speed can be increased. This enables the drivers
+ in drivers/power, drivers/power/pmic and drivers/power/regulator
+ as part of a build.
+
+config SPL_POWER_LEGACY
+ bool "Legacy power support in SPL"
+ default y if POWER_LEGACY
+ help
+ Note: This is a legacy option. Use SPL_DM_PMIC instead.
+
+ Enable support for power control in SPL. This includes support
+ for PMICs (Power-management Integrated Circuits) and some of the
+ features provided by PMICs. In particular, voltage regulators can
+ be used to enable/disable power and vary its voltage. That can be
+ useful in SPL to turn on boot peripherals and adjust CPU voltage
+ so that the clock speed can be increased. This enables the drivers
+ in drivers/power, drivers/power/pmic and drivers/power/regulator
+ as part of a build.
+
source "drivers/power/acpi_pmc/Kconfig"
source "drivers/power/domain/Kconfig"
@@ -383,4 +412,25 @@ config POWER_MT6323
This adds poweroff driver for mt6323
this pmic is used on mt7623 / Bananapi R2
+config POWER_I2C
+ bool "I2C-based power control for legacy power"
+ depends on POWER_LEGACY
+ help
+ Enable this to use the I2C driver designed for the legacy PMIC
+ interface.
+
+ Not to be used for new designs and existing ones should be moved to
+ the new PMIC interface based on driver model.
+
+config SPL_POWER_I2C
+ bool "I2C-based power control for legacy power"
+ depends on SPL_POWER_LEGACY
+ default y if POWER_I2C
+ help
+ Enable this to use the I2C driver designed for the legacy PMIC
+ interface.
+
+ Not to be used for new designs and existing ones should be moved to
+ the new PMIC interface based on driver model.
+
endmenu
diff --git a/drivers/power/Makefile b/drivers/power/Makefile
index ab52bc1582c..801b727c90f 100644
--- a/drivers/power/Makefile
+++ b/drivers/power/Makefile
@@ -16,9 +16,9 @@ obj-$(CONFIG_TPS6586X_POWER) += tps6586x.o
obj-$(CONFIG_TWL4030_POWER) += twl4030.o
obj-$(CONFIG_TWL6030_POWER) += twl6030.o
obj-$(CONFIG_PALMAS_POWER) += palmas.o
-obj-$(CONFIG_POWER_LEGACY) += power_core.o
+obj-$(CONFIG_$(SPL_TPL_)POWER_LEGACY) += power_core.o
obj-$(CONFIG_DIALOG_POWER) += power_dialog.o
obj-$(CONFIG_POWER_FSL) += power_fsl.o
-obj-$(CONFIG_POWER_I2C) += power_i2c.o
+obj-$(CONFIG_$(SPL_TPL_)POWER_I2C) += power_i2c.o
obj-$(CONFIG_POWER_SPI) += power_spi.o
obj-$(CONFIG_POWER_MT6323) += mt6323.o
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index ac735f87221..d4d463d24e1 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -23,10 +23,6 @@
/* I2C Configuration */
/* Power */
-#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
-#endif
#define CONFIG_POWER_TPS65218
#define CONFIG_POWER_TPS62362
diff --git a/include/configs/cl-som-imx7.h b/include/configs/cl-som-imx7.h
index 0692653a9ff..ebfe356eee0 100644
--- a/include/configs/cl-som-imx7.h
+++ b/include/configs/cl-som-imx7.h
@@ -22,8 +22,6 @@
#define IMX_FEC_BASE ENET_IPS_BASE_ADDR
/* PMIC */
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE3000
#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08
diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h
index 32d2581764f..a290cf0cbcc 100644
--- a/include/configs/cm_t43.h
+++ b/include/configs/cm_t43.h
@@ -50,8 +50,6 @@
#define CONFIG_AM437X_USB2PHY2_HOST
/* Power */
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_TPS65218
/* Enabling L2 Cache */
diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h
index f8af7c427bc..279d7122188 100644
--- a/include/configs/el6x_common.h
+++ b/include/configs/el6x_common.h
@@ -23,8 +23,6 @@
#define CONFIG_SYS_FSL_USDHC_NUM 2
/* PMIC */
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 615cc0b2e05..012c9b6ffef 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -65,8 +65,6 @@
/*
* PMIC
*/
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#define CONFIG_POWER_LTC3676
diff --git a/include/configs/hikey.h b/include/configs/hikey.h
index f6685a928a6..387971c687b 100644
--- a/include/configs/hikey.h
+++ b/include/configs/hikey.h
@@ -13,7 +13,6 @@
#include <linux/sizes.h>
-#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_HI6553
#define CONFIG_REMAKE_ELF
diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h
index 16417926c94..bec6c1d8e9c 100644
--- a/include/configs/imx8mp_evk.h
+++ b/include/configs/imx8mp_evk.h
@@ -31,8 +31,6 @@
#undef CONFIG_DM_MMC
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_PCA9450
#endif
diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h
index d694379fddb..ff4f7898431 100644
--- a/include/configs/imx8mq_evk.h
+++ b/include/configs/imx8mq_evk.h
@@ -44,8 +44,6 @@
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#endif
diff --git a/include/configs/imx8mq_phanbell.h b/include/configs/imx8mq_phanbell.h
index ff8a1682881..c04c0191f98 100644
--- a/include/configs/imx8mq_phanbell.h
+++ b/include/configs/imx8mq_phanbell.h
@@ -40,9 +40,6 @@
#undef CONFIG_DM_MMC
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
-
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#endif
#define CONFIG_REMAKE_ELF
diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
index b40a6969164..d3f5d8ce95e 100644
--- a/include/configs/ls1046ardb.h
+++ b/include/configs/ls1046ardb.h
@@ -124,10 +124,6 @@
#define I2C_RETIMER_ADDR 0x18
/* PMIC */
-#define CONFIG_POWER_LEGACY
-#ifdef CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
-#endif
/*
* Environment
diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
index bd2d0e5ee79..065e8c7f3b1 100644
--- a/include/configs/mx51evk.h
+++ b/include/configs/mx51evk.h
@@ -30,7 +30,6 @@
#define CONFIG_MXC_UART_BASE UART1_BASE
/* PMIC Controller */
-#define CONFIG_POWER_LEGACY
#define CONFIG_POWER_SPI
#define CONFIG_POWER_FSL
#define CONFIG_FSL_PMIC_BUS 0
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index a546e9620c2..50fc9625d02 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -33,8 +33,6 @@
#define CONFIG_MXC_USB_FLAGS 0
/* PMIC Controller */
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_DIALOG_POWER
#define CONFIG_POWER_FSL
#define CONFIG_POWER_FSL_MC13892
diff --git a/include/configs/mx6sabreauto.h b/include/configs/mx6sabreauto.h
index ccf631dedd4..1bfc0354271 100644
--- a/include/configs/mx6sabreauto.h
+++ b/include/configs/mx6sabreauto.h
@@ -59,8 +59,6 @@
/* DMA stuff, needed for GPMI/MXS NAND support */
/* PMIC */
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index ee75ada5a71..a9f353d9b13 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -38,8 +38,6 @@
#endif
/* PMIC */
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
diff --git a/include/configs/novena.h b/include/configs/novena.h
index e39191fa1a9..46c530161ac 100644
--- a/include/configs/novena.h
+++ b/include/configs/novena.h
@@ -68,8 +68,6 @@
#endif
/* PMIC */
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
diff --git a/include/configs/phycore_imx8mp.h b/include/configs/phycore_imx8mp.h
index f9686e14a8f..874c94e01f9 100644
--- a/include/configs/phycore_imx8mp.h
+++ b/include/configs/phycore_imx8mp.h
@@ -29,8 +29,6 @@
#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_PCA9450
#endif
diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
index a0e782dbd34..36c57923dec 100644
--- a/include/configs/pico-imx7d.h
+++ b/include/configs/pico-imx7d.h
@@ -122,8 +122,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* PMIC */
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE3000
#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08
diff --git a/include/configs/pico-imx8mq.h b/include/configs/pico-imx8mq.h
index c67264da174..6c642391509 100644
--- a/include/configs/pico-imx8mq.h
+++ b/include/configs/pico-imx8mq.h
@@ -40,9 +40,6 @@
#undef CONFIG_DM_MMC
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
-
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#endif
#define CONFIG_REMAKE_ELF
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index 11ad2f7cc2f..1efe9d57a84 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -42,8 +42,6 @@
#define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS 20
#if !defined(CONFIG_DM_PMIC)
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#define TQMA6_PFUZE100_I2C_BUS 2
diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h
index d51a25dd2e4..b06abc9286b 100644
--- a/include/configs/udoo_neo.h
+++ b/include/configs/udoo_neo.h
@@ -68,8 +68,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* PMIC */
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE3000
#define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08
#define PFUZE3000_I2C_BUS 0
diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h
index 4c34bec2924..dcdaffc09b6 100644
--- a/include/configs/vining_2000.h
+++ b/include/configs/vining_2000.h
@@ -40,8 +40,6 @@
#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC4_BASE_ADDR
/* PMIC */
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
diff --git a/include/configs/warp.h b/include/configs/warp.h
index 29f69bb7dcd..11a9b31671b 100644
--- a/include/configs/warp.h
+++ b/include/configs/warp.h
@@ -52,8 +52,6 @@
/* I2C Configs */
/* PMIC */
-#define CONFIG_POWER_LEGACY
-#define CONFIG_POWER_I2C
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
diff --git a/include/power/max77686_pmic.h b/include/power/max77686_pmic.h
index 95ba61d9530..cf476c85ab3 100644
--- a/include/power/max77686_pmic.h
+++ b/include/power/max77686_pmic.h
@@ -154,7 +154,7 @@ enum {
OPMODE_ON,
};
-#ifdef CONFIG_POWER_LEGACY
+#if CONFIG_IS_ENABLED(POWER_LEGACY)
int max77686_set_ldo_voltage(struct pmic *p, int ldo, ulong uV);
int max77686_set_ldo_mode(struct pmic *p, int ldo, char opmode);
int max77686_set_buck_voltage(struct pmic *p, int buck, ulong uV);
diff --git a/include/power/pmic.h b/include/power/pmic.h
index a10e1735007..97f855ce398 100644
--- a/include/power/pmic.h
+++ b/include/power/pmic.h
@@ -18,7 +18,7 @@
enum { PMIC_I2C, PMIC_SPI, PMIC_NONE};
/* TODO: Change to !CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
-#ifdef CONFIG_POWER_LEGACY
+#if CONFIG_IS_ENABLED(POWER_LEGACY)
enum { I2C_PMIC, I2C_NUM, };
enum { PMIC_READ, PMIC_WRITE, };
enum { PMIC_SENSOR_BYTE_ORDER_LITTLE, PMIC_SENSOR_BYTE_ORDER_BIG, };
@@ -83,7 +83,7 @@ struct pmic {
struct pmic *parent;
struct list_head list;
};
-#endif /* CONFIG_POWER_LEGACY */
+#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */
/* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
#ifdef CONFIG_DM_PMIC
@@ -311,7 +311,7 @@ struct uc_pmic_priv {
#endif /* DM_PMIC */
/* TODO: Change to CONFIG_IS_ENABLED(DM_PMIC) when SPL_DM_PMIC exists */
-#ifdef CONFIG_POWER_LEGACY
+#if CONFIG_IS_ENABLED(POWER_LEGACY)
/* Legacy API, do not use */
int pmic_init(unsigned char bus);
@@ -324,7 +324,7 @@ int pmic_probe(struct pmic *p);
int pmic_reg_read(struct pmic *p, u32 reg, u32 *val);
int pmic_reg_write(struct pmic *p, u32 reg, u32 val);
int pmic_set_output(struct pmic *p, u32 reg, int ldo, int on);
-#endif /* CONFIG_POWER_LEGACY */
+#endif /* CONFIG_IS_ENABLED(POWER_LEGACY) */
#define pmic_i2c_addr (p->hw.i2c.addr)
#define pmic_i2c_tx_num (p->hw.i2c.tx_num)
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 50e607f436f..6abb18b7aef 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -1035,8 +1035,6 @@ CONFIG_POST_WATCHDOG
CONFIG_POWER_FSL
CONFIG_POWER_FSL_MC13892
CONFIG_POWER_HI6553
-CONFIG_POWER_I2C
-CONFIG_POWER_LEGACY
CONFIG_POWER_LTC3676
CONFIG_POWER_LTC3676_I2C_ADDR
CONFIG_POWER_MAX77696_I2C_ADDR