diff options
author | Peng Fan <peng.fan@nxp.com> | 2019-10-29 02:21:31 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-10-29 13:32:12 +0100 |
commit | f7907e57aea2adcd0b57ebcca410e125412ab680 (patch) | |
tree | 333fb9e7cddca1d0d2631d7330c47e1324473132 /drivers/regulator | |
parent | dt-bindings: regulator: fixed: add off-on-delay-us property (diff) | |
download | linux-f7907e57aea2adcd0b57ebcca410e125412ab680.tar.xz linux-f7907e57aea2adcd0b57ebcca410e125412ab680.zip |
regulator: fixed: add off-on-delay
Depends on board design, the gpio controlling regulator may
connects with a big capacitance. When need off, it takes some time
to let the regulator to be truly off. If not add enough delay, the
regulator might have always been on, so introduce off-on-delay to
handle such case.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/1572311875-22880-3-git-send-email-peng.fan@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/fixed.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index f81533070058..bc0bbd99e98d 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -123,6 +123,7 @@ of_get_fixed_voltage_config(struct device *dev, config->enabled_at_boot = true; of_property_read_u32(np, "startup-delay-us", &config->startup_delay); + of_property_read_u32(np, "off-on-delay-us", &config->off_on_delay); if (of_find_property(np, "vin-supply", NULL)) config->input_supply = "vin"; @@ -189,6 +190,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) } drvdata->desc.enable_time = config->startup_delay; + drvdata->desc.off_on_delay = config->off_on_delay; if (config->input_supply) { drvdata->desc.supply_name = devm_kstrdup(&pdev->dev, |