[PATCH v2 4/5] power: regulator: Drop regulator_unset()

Marek Vasut marex at denx.de
Wed Sep 25 04:21:55 CEST 2024


This function is never called, drop it.

Signed-off-by: Marek Vasut <marex at denx.de>
---
Cc: Ben Wolsieffer <benwolsieffer at gmail.com>
Cc: Caleb Connolly <caleb.connolly at linaro.org>
Cc: Chris Morgan <macromorgan at hotmail.com>
Cc: Dragan Simic <dsimic at manjaro.org>
Cc: Eugen Hristev <eugen.hristev at collabora.com>
Cc: Francesco Dolcini <francesco.dolcini at toradex.com>
Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
Cc: Jaehoon Chung <jh80.chung at samsung.com>
Cc: Jagan Teki <jagan at amarulasolutions.com>
Cc: Jonas Karlman <jonas at kwiboo.se>
Cc: Kever Yang <kever.yang at rock-chips.com>
Cc: Matteo Lisi <matteo.lisi at engicam.com>
Cc: Mattijs Korpershoek <mkorpershoek at baylibre.com>
Cc: Max Krummenacher <max.krummenacher at toradex.com>
Cc: Neil Armstrong <neil.armstrong at linaro.org>
Cc: Patrice Chotard <patrice.chotard at foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay at foss.st.com>
Cc: Philipp Tomsich <philipp.tomsich at vrull.eu>
Cc: Quentin Schulz <quentin.schulz at cherry.de>
Cc: Sam Day <me at samcday.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Sumit Garg <sumit.garg at linaro.org>
Cc: Svyatoslav Ryhel <clamor95 at gmail.com>
Cc: Thierry Reding <treding at nvidia.com>
Cc: Tom Rini <trini at konsulko.com>
Cc: Volodymyr Babchuk <Volodymyr_Babchuk at epam.com>
Cc: u-boot-amlogic at groups.io
Cc: u-boot-qcom at groups.io
Cc: u-boot at dh-electronics.com
Cc: u-boot at lists.denx.de
Cc: uboot-stm32 at st-md-mailman.stormreply.com
---
V2: Rebase on current u-boot/next
---
 drivers/power/regulator/regulator-uclass.c | 11 -----------
 include/power/regulator.h                  | 14 +-------------
 2 files changed, 1 insertion(+), 24 deletions(-)

diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index 3c05fdf1966..34c2a36ec44 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -343,17 +343,6 @@ out:
 	return ret;
 }
 
-int regulator_unset(struct udevice *dev)
-{
-	struct dm_regulator_uclass_plat *uc_pdata;
-
-	uc_pdata = dev_get_uclass_plat(dev);
-	if (uc_pdata && uc_pdata->force_off)
-		return regulator_set_enable(dev, false);
-
-	return -EMEDIUMTYPE;
-}
-
 static void regulator_show(struct udevice *dev, int ret)
 {
 	struct dm_regulator_uclass_plat *uc_pdata;
diff --git a/include/power/regulator.h b/include/power/regulator.h
index bb07a814c79..5363483d02a 100644
--- a/include/power/regulator.h
+++ b/include/power/regulator.h
@@ -430,7 +430,7 @@ int regulators_enable_boot_on(bool verbose);
  *
  * This disables all regulators which are marked to be off at boot time.
  *
- * This effectively calls regulator_unset() for every regulator.
+ * This effectively does nothing.
  */
 int regulators_enable_boot_off(bool verbose);
 
@@ -453,18 +453,6 @@ int regulators_enable_boot_off(bool verbose);
  */
 int regulator_autoset(struct udevice *dev);
 
-/**
- * regulator_unset: turn off a regulator
- *
- * The setup depends on constraints found in device's uclass's platform data
- * (struct dm_regulator_uclass_platdata):
- *
- * - Disable - will set - if  'force_off' is set to true,
- *
- * The function returns on the first-encountered error.
- */
-int regulator_unset(struct udevice *dev);
-
 /**
  * regulator_autoset_by_name: setup the regulator given by its uclass's
  * platform data name field. The setup depends on constraints found in device's
-- 
2.45.2



More information about the U-Boot mailing list