]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
power: regulator: support off-on-delay-us
authorPeng Fan <peng.fan@nxp.com>
Mon, 4 Nov 2019 09:27:23 +0000 (09:27 +0000)
committerTom Rini <trini@konsulko.com>
Tue, 7 Jan 2020 16:13:25 +0000 (11:13 -0500)
off-on-delay-us has been supported by Linux, so let's use it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/power/regulator/regulator_common.c

index 20410865672d9a78223f7d451282789132830a17..939efb2c0d0d9ace36e74b95e59da8479a71c183 100644 (file)
@@ -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;
 }