diff options
author | Haibo Chen <haibo.chen@nxp.com> | 2017-04-14 18:51:17 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:26:16 +0800 |
commit | 75687f8bd8d35ce769cf3151f59cdc8424c1d057 (patch) | |
tree | 30e532622204d83ec0674a6587ea4f5253256adc /drivers/regulator/fixed.c | |
parent | dbfbded14b6316b75d67861798cae914ab55ed3c (diff) |
MLK-14638-1 regulator: fixed: add off_on_delay support
Add off_on_delay for fixed regulator. This can assign the delay time
between the regulator disable and regulator enable.
User can define the delay value by using 'off-on-delay' in dts file.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Diffstat (limited to 'drivers/regulator/fixed.c')
-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 27b6d75cb954..136a9a3c7e30 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -84,6 +84,7 @@ of_get_fixed_voltage_config(struct device *dev, return ERR_PTR(config->gpio); of_property_read_u32(np, "startup-delay-us", &config->startup_delay); + of_property_read_u32(np, "off-on-delay", &config->off_on_delay); config->enable_high = of_property_read_bool(np, "enable-active-high"); config->gpio_is_open_drain = of_property_read_bool(np, @@ -134,6 +135,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) drvdata->desc.ops = &fixed_voltage_ops; 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, |