]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
power: regulator: Drop regulators_enable_boot_on/off()
authorMarek Vasut <marex@denx.de>
Thu, 26 Sep 2024 23:14:15 +0000 (01:14 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 1 Oct 2024 01:19:07 +0000 (19:19 -0600)
Both regulators_enable_boot_on/off() are unused and superseded by
regulator uclass regulator_post_probe(). Remove both functions.

Signed-off-by: Marek Vasut <marex@denx.de>
14 files changed:
arch/arm/mach-rockchip/board.c
arch/arm/mach-snapdragon/board.c
arch/arm/mach-tegra/board2.c
board/Marvell/octeontx2_cn913x/board.c
board/amlogic/odroid-go-ultra/odroid-go-ultra.c
board/dhelectronics/dh_imx6/dh_imx6.c
board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c
board/dhelectronics/dh_stm32mp1/board.c
board/engicam/stm32mp1/stm32mp1.c
board/google/veyron/veyron.c
board/samsung/common/exynos5-dt.c
board/st/stm32mp1/stm32mp1.c
drivers/power/regulator/regulator-uclass.c
include/power/regulator.h

index 0fdf9365b41e9eff4036fe0cf8ac97b8fe3e2a01..3fadf7e412228c7c6ad5ac9444e8c33e494e5fcd 100644 (file)
@@ -202,14 +202,6 @@ int board_late_init(void)
 
 int board_init(void)
 {
-       int ret;
-
-#ifdef CONFIG_DM_REGULATOR
-       ret = regulators_enable_boot_on(false);
-       if (ret)
-               debug("%s: Cannot enable boot on regulator\n", __func__);
-#endif
-
        return 0;
 }
 
index 0af297470a64befa66cdccccf8c559b908e99e72..2ab2ceb51389607a974e3be5b697e8e69c588158 100644 (file)
@@ -237,7 +237,6 @@ void __weak qcom_board_init(void)
 
 int board_init(void)
 {
-       regulators_enable_boot_on(false);
        show_psci_version();
        qcom_of_fixup_nodes();
        qcom_board_init();
index 7971e3b68d51274345c8a82de4c43f9a2ebd9d6f..5c5838629b27becf450a903e592ddc347b19423f 100644 (file)
@@ -187,9 +187,6 @@ int board_init(void)
        warmboot_prepare_code(TEGRA_LP0_ADDR, TEGRA_LP0_SIZE);
 #endif
 
-       /* Set up boot-on regulators */
-       regulators_enable_boot_on(_DEBUG);
-
        return nvidia_board_init();
 }
 
index 3d20cfb2fabe756fb1b8e8d84f5e41db41d1bcc8..3ffe15d42b803f407c70608d86874be1dfb71abd 100644 (file)
@@ -23,11 +23,6 @@ int board_early_init_f(void)
 
 int board_early_init_r(void)
 {
-       if (CONFIG_IS_ENABLED(DM_REGULATOR)) {
-               /* Check if any existing regulator should be turned down */
-               regulators_enable_boot_off(false);
-       }
-
        return 0;
 }
 
index 8f3f2045d74d3323d4ab9650a66c51010bb8e291..f941207173777faee0ebd30fc371253c9b15a14a 100644 (file)
@@ -16,7 +16,5 @@ int mmc_get_env_dev(void)
 
 int board_init(void)
 {
-       regulators_enable_boot_on(_DEBUG);
-
        return 0;
 }
index ada44e0142445d57ccf27f1f7deed2916dacbe6b..f2b14bf701aff645549c7339483d274ede38280e 100644 (file)
@@ -128,8 +128,6 @@ int board_init(void)
 
        setup_fec_clock();
 
-       regulators_enable_boot_on(_DEBUG);
-
        return 0;
 }
 
index a389ab3c2d918f5e03c6c20d5f6447834acfd48c..78aae412350153e134fe97f8c747d3d3563563e6 100644 (file)
@@ -112,8 +112,6 @@ int dh_setup_mac_address(void)
 
 int board_init(void)
 {
-       regulators_enable_boot_on(_DEBUG);
-
        return 0;
 }
 
index 4f4f537fee56dca40a9a1d55ba334b7101a9eac1..24c5f37c12fc140cc0be2a1d99630270bae10ac0 100644 (file)
@@ -622,8 +622,6 @@ static void board_init_regulator_av96(void)
 static void board_init_regulator(void)
 {
        board_init_regulator_av96();
-
-       regulators_enable_boot_on(_DEBUG);
 }
 #else
 static inline int board_get_regulator_buck3_nvm_uv_av96(int *uv)
index bc2af66d8e964143f1f2330f07903855598a1fc7..56557d5642981f4f76c2d655b04795fcadc81863 100644 (file)
@@ -37,9 +37,6 @@ int checkboard(void)
 /* board dependent setup after realloc */
 int board_init(void)
 {
-       if (IS_ENABLED(CONFIG_DM_REGULATOR))
-               regulators_enable_boot_on(_DEBUG);
-
        return 0;
 }
 
index bd8ce63377230afde4a3437347c34c3e4ca16db9..674f19ba03c99fcd75b31ab3c6b518a98fbeb1db 100644 (file)
@@ -57,10 +57,6 @@ static int veyron_init(void)
        if (ret)
                return log_msg_ret("s33", ret);
 
-       ret = regulators_enable_boot_on(false);
-       if (ret)
-               return log_msg_ret("boo", ret);
-
        return 0;
 }
 #endif
index 56862bcb34daed5ac7507abbae6e37d36e5cb429..68edd1ec2826841c74702fd8f16f8e98b7519a18 100644 (file)
@@ -88,10 +88,6 @@ int exynos_power_init(void)
        if (ret == -ENODEV)
                return 0;
 
-       ret = regulators_enable_boot_on(false);
-       if (ret)
-               return ret;
-
        ret = exynos_set_regulator("vdd_mif", 1100000);
        if (ret)
                return ret;
index 97532a8156ffcc73f7536023dfb8576b6fb5222c..d5e5e776d2a7e0797cf9479f1a3c851a05fd77f5 100644 (file)
@@ -665,8 +665,6 @@ int board_init(void)
        if (board_is_stm32mp15x_dk2())
                board_stm32mp15x_dk2_init();
 
-       regulators_enable_boot_on(_DEBUG);
-
        /*
         * sysconf initialisation done only when U-Boot is running in secure
         * done in TF-A for TFABOOT.
index 4e83819ff73a4f05ca2973f8cd848736e3a5916a..decd0802c8489af4196c965baf528a9fc29651a7 100644 (file)
@@ -526,16 +526,6 @@ static int regulator_post_probe(struct udevice *dev)
        return 0;
 }
 
-int regulators_enable_boot_on(bool verbose)
-{
-       return 0;
-}
-
-int regulators_enable_boot_off(bool verbose)
-{
-       return 0;
-}
-
 UCLASS_DRIVER(regulator) = {
        .id             = UCLASS_REGULATOR,
        .name           = "regulator",
index 5363483d02a048400c6e6813e390ee7143c500f4..8a914dfc74f476a934eaa3f2959472c22470402c 100644 (file)
@@ -414,26 +414,6 @@ int regulator_get_mode(struct udevice *dev);
  */
 int regulator_set_mode(struct udevice *dev, int mode_id);
 
-/**
- * regulators_enable_boot_on() - enable regulators needed for boot
- *
- * This enables all regulators which are marked to be on at boot time. This
- * only works for regulators which don't have a range for voltage/current,
- * since in that case it is not possible to know which value to use.
- *
- * This effectively calls regulator_autoset() for every regulator.
- */
-int regulators_enable_boot_on(bool verbose);
-
-/**
- * regulators_enable_boot_off() - disable regulators needed for boot
- *
- * This disables all regulators which are marked to be off at boot time.
- *
- * This effectively does nothing.
- */
-int regulators_enable_boot_off(bool verbose);
-
 /**
  * regulator_autoset: setup the voltage/current on a regulator
  *
@@ -617,11 +597,6 @@ static inline int regulator_set_mode(struct udevice *dev, int mode_id)
        return -ENOSYS;
 }
 
-static inline int regulators_enable_boot_on(bool verbose)
-{
-       return -ENOSYS;
-}
-
 static inline int regulator_autoset(struct udevice *dev)
 {
        return -ENOSYS;