Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA90BEB64DC for ; Thu, 20 Jul 2023 12:39:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 28B2B867DD; Thu, 20 Jul 2023 14:38:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CsUlUYGh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 57163866E1; Thu, 20 Jul 2023 14:38:27 +0200 (CEST) Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 41254867DE for ; Thu, 20 Jul 2023 14:38:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=clamor95@gmail.com Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fbc0314a7bso1130365e87.2 for ; Thu, 20 Jul 2023 05:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689856700; x=1690461500; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vtUhK6sZA1/W/s5lxana7kH4PNz/nW8Wqg9QXqgnxCM=; b=CsUlUYGhAMnPilTJslmdeMAxUvtflgYPcWYMLKkark5JGHc0HM6nxhChkfpWo4Bvuo 3sURaVT94AUstbU2yJXa7AwWJp2RaaK3P1uBK7WhWV+pbDIcKhoRq2zvL2Etb5nbS1pt C8BQdyowNnAQWAnFaj2CY2CeZUotBPSyoZ1LHWXmq7JyFOxy5PU5k8Fo1k+Qui3ZZubZ LOSOTjUtXnfvKWxlYNA2pFReSzLSLJ5ruieYAKDjixQDP6FIjEG6CMPVRSVydon+mfkA LfhaK4x/YA3oB/5jTxP2XGpFGmHPoi5ykVwGAtVp3z/+nRumTwTr0DBbppv/yYcwTQrh tgiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689856700; x=1690461500; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vtUhK6sZA1/W/s5lxana7kH4PNz/nW8Wqg9QXqgnxCM=; b=K4svDGi/iZY/AbSSSFbsuKCRbjsxcmAHRvCg7TATyCOf+l3hVBT6ip8otTL49i4yWX yvBtIMkrcpJblAls3k7a7v1CgKqE9IojTt8WzuzbdB0PNe2134IUQ64LS7Kz+fq0qlI8 iX6936SokPNp2xEvu02lHCHIhDTL2dLefrdtedv0zBiHPZ8JXhiMH6nNBhkqpXvhXpg9 u+JdygIQdW9tZo6mZjuPZ0NZJ/Zt/cjpLyu8fI1hTDP+2rdVkWIRTJoNTrduiNQ3buhb 5tNlm2aS5kLrMZ4St44Aup0KgspFw+J6J/Zg2ziqPXFDKIggS21eVwoBSAGlWBXrWy5k GJNQ== X-Gm-Message-State: ABy/qLaqMdRrjyQwx1kP3MJ9IoujWetJRAwzkOaStdVWWTn0M2t9gryd 2NzqTtko8pHHWmHEiMdtQFM= X-Google-Smtp-Source: APBJJlGWhee7bfrZaLG9cg0Jn/oPcM4BK1EpZt1xWWnWH4tZvev3CERBKgWd/B49JRehJYYhOIO8Jw== X-Received: by 2002:a05:6512:3610:b0:4f8:b349:6938 with SMTP id f16-20020a056512361000b004f8b3496938mr1332422lfs.65.1689856700235; Thu, 20 Jul 2023 05:38:20 -0700 (PDT) Received: from xeon.. ([188.163.112.64]) by smtp.gmail.com with ESMTPSA id m25-20020ac24ad9000000b004fb9c625b4asm184401lfp.210.2023.07.20.05.38.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jul 2023 05:38:19 -0700 (PDT) From: Svyatoslav Ryhel To: Simon Glass , Philipp Tomsich , Kever Yang , Neil Armstrong , Marek Vasut , Patrick Delaunay , Patrice Chotard , Jagan Teki , Matteo Lisi , Jaehoon Chung , Anatolij Gustschin , Jonas Karlman , Quentin Schulz , Svyatoslav Ryhel , Eugen Hristev Cc: u-boot@lists.denx.de, u-boot-amlogic@groups.io, u-boot@dh-electronics.com, uboot-stm32@st-md-mailman.stormreply.com Subject: [PATCH v2 7/7] power: regulator-uclass: remove all deprecated API use Date: Thu, 20 Jul 2023 15:37:44 +0300 Message-Id: <20230720123744.26854-8-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230720123744.26854-1-clamor95@gmail.com> References: <20230720123744.26854-1-clamor95@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean THIS REQUIRES PRECISE TESTING! Signed-off-by: Svyatoslav Ryhel --- arch/arm/mach-rockchip/board.c | 8 -------- arch/arm/mach-rockchip/rk3399/rk3399.c | 10 ---------- board/Marvell/octeontx2_cn913x/board.c | 5 ----- board/amlogic/odroid-go-ultra/odroid-go-ultra.c | 2 -- board/dhelectronics/dh_stm32mp1/board.c | 2 -- board/engicam/stm32mp1/stm32mp1.c | 3 --- board/google/veyron/veyron.c | 6 ------ board/samsung/common/exynos5-dt.c | 4 ---- board/samsung/odroid/odroid.c | 10 ---------- board/st/stm32mp1/stm32mp1.c | 9 --------- drivers/video/bridge/ps862x.c | 12 ++++++++---- drivers/video/rockchip/rk_vop.c | 6 ++---- 12 files changed, 10 insertions(+), 67 deletions(-) diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index 8d7b39ba15..3eaea4b04a 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -189,14 +189,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; } diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c index a7cc91a952..cbd2ea047d 100644 --- a/arch/arm/mach-rockchip/rk3399/rk3399.c +++ b/arch/arm/mach-rockchip/rk3399/rk3399.c @@ -280,15 +280,5 @@ void spl_board_init(void) if (cru->glb_rst_st != 0) rk3399_force_power_on_reset(); } - - if (IS_ENABLED(CONFIG_SPL_DM_REGULATOR)) { - /* - * Turning the eMMC and SPI back on (if disabled via the Qseven - * BIOS_ENABLE) signal is done through a always-on regulator). - */ - if (regulators_enable_boot_on(false)) - debug("%s: Cannot enable boot on regulator\n", - __func__); - } } #endif diff --git a/board/Marvell/octeontx2_cn913x/board.c b/board/Marvell/octeontx2_cn913x/board.c index 3d20cfb2fa..3ffe15d42b 100644 --- a/board/Marvell/octeontx2_cn913x/board.c +++ b/board/Marvell/octeontx2_cn913x/board.c @@ -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; } diff --git a/board/amlogic/odroid-go-ultra/odroid-go-ultra.c b/board/amlogic/odroid-go-ultra/odroid-go-ultra.c index bbd23e20fc..fa6105a071 100644 --- a/board/amlogic/odroid-go-ultra/odroid-go-ultra.c +++ b/board/amlogic/odroid-go-ultra/odroid-go-ultra.c @@ -16,7 +16,5 @@ int mmc_get_env_dev(void) int board_init(void) { - regulators_enable_boot_on(_DEBUG); - return 0; } diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c index f9cfabe242..a8ad5a1620 100644 --- a/board/dhelectronics/dh_stm32mp1/board.c +++ b/board/dhelectronics/dh_stm32mp1/board.c @@ -615,8 +615,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) diff --git a/board/engicam/stm32mp1/stm32mp1.c b/board/engicam/stm32mp1/stm32mp1.c index 5223e9bae8..c98bbdc71b 100644 --- a/board/engicam/stm32mp1/stm32mp1.c +++ b/board/engicam/stm32mp1/stm32mp1.c @@ -38,9 +38,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; } diff --git a/board/google/veyron/veyron.c b/board/google/veyron/veyron.c index 32dbcdc4d1..527e9d4b0e 100644 --- a/board/google/veyron/veyron.c +++ b/board/google/veyron/veyron.c @@ -62,12 +62,6 @@ static int veyron_init(void) if (ret) return ret; - ret = regulators_enable_boot_on(false); - if (ret) { - debug("%s: Cannot enable boot on regulators\n", __func__); - return ret; - } - return 0; } #endif diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c index cde77d79a0..45d34d838d 100644 --- a/board/samsung/common/exynos5-dt.c +++ b/board/samsung/common/exynos5-dt.c @@ -92,10 +92,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; diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c index 39a60e4ad2..28086ee92e 100644 --- a/board/samsung/odroid/odroid.c +++ b/board/samsung/odroid/odroid.c @@ -431,16 +431,6 @@ int exynos_init(void) int exynos_power_init(void) { - const char *mmc_regulators[] = { - "VDDQ_EMMC_1.8V", - "VDDQ_EMMC_2.8V", - "TFLASH_2.8V", - NULL, - }; - - if (regulator_list_autoset(mmc_regulators, NULL, true)) - pr_err("Unable to init all mmc regulators\n"); - return 0; } diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 3205a31c6d..7e425edefd 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -602,13 +602,6 @@ static int board_stm32mp15x_dk2_init(void) goto error; } - /* power-up audio IC */ - regulator_autoset_by_name("v1v8_audio", NULL); - - /* power-up HDMI IC */ - regulator_autoset_by_name("v1v2_hdmi", NULL); - regulator_autoset_by_name("v3v3_hdmi", NULL); - error: return ret; } @@ -665,8 +658,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. diff --git a/drivers/video/bridge/ps862x.c b/drivers/video/bridge/ps862x.c index d1d22a6e23..52a343bde2 100644 --- a/drivers/video/bridge/ps862x.c +++ b/drivers/video/bridge/ps862x.c @@ -77,13 +77,17 @@ static int ps8622_attach(struct udevice *dev) /* set the LDO providing the 1.2V rail to the Parade bridge */ ret = uclass_get_device_by_phandle(UCLASS_REGULATOR, dev, "power-supply", ®); - if (!ret) { - ret = regulator_autoset(reg); - } else if (ret != -ENOENT) { - debug("%s: Failed to enable power: ret=%d\n", __func__, ret); + if (ret) { + debug("%s: Failed to get power: ret=%d\n", __func__, ret); return ret; } + if (reg) { + ret = regulator_set_enable(reg, true); + if (ret) + return ret; + } + ret = video_bridge_set_active(dev, true); if (ret) return ret; diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c index c514e2a0e4..e81eed5ffa 100644 --- a/drivers/video/rockchip/rk_vop.c +++ b/drivers/video/rockchip/rk_vop.c @@ -397,7 +397,7 @@ static int rk_display_init(struct udevice *dev, ulong fbbase, ofnode ep_node) void rk_vop_probe_regulators(struct udevice *dev, const char * const *names, int cnt) { - int i, ret; + int i; const char *name; struct udevice *reg; @@ -405,9 +405,7 @@ void rk_vop_probe_regulators(struct udevice *dev, name = names[i]; debug("%s: probing regulator '%s'\n", dev->name, name); - ret = regulator_autoset_by_name(name, ®); - if (!ret) - ret = regulator_set_enable(reg, true); + regulator_set_enable(reg, true); } } -- 2.39.2