[PATCH] regulator: fixed: remove duplicate always-on handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Regulator core already handles always-on property, so remove handling in
fixed-regulator driver. For this to have no functional change, all
regulator uses must be balanced as regulator code implements always-on
by initializing use count to baseline of 1, while fixed-regulator
prevents disabling altogether. As mismatched regulator enable/disable
is a bug in need of fixing anyway, this is tolerated.

Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx>
---
 drivers/regulator/fixed.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index c5f97d78df40..ec64f39b86c7 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -15,7 +15,6 @@
 
 struct regulator_fixed {
 	int gpio;
-	int always_on;
 	struct regulator_dev rdev;
 	struct regulator_desc rdesc;
 };
@@ -34,9 +33,6 @@ static int regulator_fixed_disable(struct regulator_dev *rdev)
 {
 	struct regulator_fixed *fix = container_of(rdev, struct regulator_fixed, rdev);
 
-	if (fix->always_on)
-		return 0;
-
 	if (!gpio_is_valid(fix->gpio))
 		return 0;
 
@@ -76,12 +72,6 @@ static int regulator_fixed_probe(struct device_d *dev)
 	if (!of_property_read_u32(np, "off-on-delay-us", &delay))
 		fix->rdesc.off_on_delay = delay;
 
-	if (of_find_property(np, "regulator-always-on", NULL) ||
-	    of_find_property(np, "regulator-boot-on", NULL)) {
-		fix->always_on = 1;
-		regulator_fixed_enable(&fix->rdev);
-	}
-
 	ret = of_regulator_register(&fix->rdev, np);
 	if (ret)
 		goto err;
-- 
2.34.1





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux