summaryrefslogtreecommitdiff
path: root/drivers/power/regulator/regulator_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/regulator/regulator_common.c')
-rw-r--r--drivers/power/regulator/regulator_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/power/regulator/regulator_common.c b/drivers/power/regulator/regulator_common.c
index 85af8d599ad..c0387eff4fc 100644
--- a/drivers/power/regulator/regulator_common.c
+++ b/drivers/power/regulator/regulator_common.c
@@ -87,6 +87,9 @@ int regulator_common_set_enable(const struct udevice *dev,
}
}
+ if (enable && plat->off_on_delay_us)
+ udelay(plat->off_on_delay_us);
+
ret = dm_gpio_set_value(&plat->gpio, enable);
if (ret) {
pr_err("Can't set regulator : %s gpio to: %d\n", dev->name,
@@ -97,9 +100,6 @@ int regulator_common_set_enable(const struct udevice *dev,
if (enable && plat->startup_delay_us)
udelay(plat->startup_delay_us);
- if (!enable && plat->off_on_delay_us)
- udelay(plat->off_on_delay_us);
-
if (enable)
plat->enable_count++;
else