diff mbox series

[U-Boot] power: regulator: support off-on-delay-us

Message ID 20191104094505.29293-1-peng.fan@nxp.com
State Accepted
Commit 5677fe9d6b82a931b058de76b1668fe5b63d4616
Delegated to: Tom Rini
Headers show
Series [U-Boot] power: regulator: support off-on-delay-us | expand

Commit Message

Peng Fan Nov. 4, 2019, 9:27 a.m. UTC
off-on-delay-us has been supported by Linux, so let's use it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---

V1:
 Linux Tree:
 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f7907e57aea2adcd0b57ebcca410e125412ab680

 drivers/power/regulator/regulator_common.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Tom Rini Jan. 8, 2020, 8:12 p.m. UTC | #1
On Mon, Nov 04, 2019 at 09:27:23AM +0000, Peng Fan wrote:

> off-on-delay-us has been supported by Linux, so let's use it.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/power/regulator/regulator_common.c b/drivers/power/regulator/regulator_common.c
index 2041086567..939efb2c0d 100644
--- a/drivers/power/regulator/regulator_common.c
+++ b/drivers/power/regulator/regulator_common.c
@@ -37,7 +37,11 @@  int regulator_common_ofdata_to_platdata(struct udevice *dev,
 	dev_pdata->startup_delay_us = dev_read_u32_default(dev,
 							"startup-delay-us", 0);
 	dev_pdata->off_on_delay_us =
+		dev_read_u32_default(dev, "off-on-delay-us", 0);
+	if (!dev_pdata->off_on_delay_us) {
+		dev_pdata->off_on_delay_us =
 			dev_read_u32_default(dev, "u-boot,off-on-delay-us", 0);
+	}
 
 	return 0;
 }