dm: regulator: add "regulator-loader-ignore" property support
The property indicates this regulator should skip init setting sequence, usually for saving boot time. Change-Id: I40a81c84b0696c70b16ddba50aeb457412287116 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
parent
ea4b8016c1
commit
6999767bb2
|
|
@ -265,6 +265,9 @@ int regulator_autoset(struct udevice *dev)
|
||||||
|
|
||||||
uc_pdata = dev_get_uclass_platdata(dev);
|
uc_pdata = dev_get_uclass_platdata(dev);
|
||||||
|
|
||||||
|
if (uc_pdata->ignore)
|
||||||
|
return ret;
|
||||||
|
|
||||||
if (uc_pdata->ramp_delay != -ENODATA)
|
if (uc_pdata->ramp_delay != -ENODATA)
|
||||||
regulator_set_ramp_delay(dev, uc_pdata->ramp_delay);
|
regulator_set_ramp_delay(dev, uc_pdata->ramp_delay);
|
||||||
|
|
||||||
|
|
@ -437,6 +440,7 @@ static int regulator_pre_probe(struct udevice *dev)
|
||||||
-ENODATA);
|
-ENODATA);
|
||||||
uc_pdata->always_on = dev_read_bool(dev, "regulator-always-on");
|
uc_pdata->always_on = dev_read_bool(dev, "regulator-always-on");
|
||||||
uc_pdata->boot_on = dev_read_bool(dev, "regulator-boot-on");
|
uc_pdata->boot_on = dev_read_bool(dev, "regulator-boot-on");
|
||||||
|
uc_pdata->ignore = dev_read_bool(dev, "regulator-loader-ignore");
|
||||||
uc_pdata->ramp_delay = dev_read_u32_default(dev, "regulator-ramp-delay",
|
uc_pdata->ramp_delay = dev_read_u32_default(dev, "regulator-ramp-delay",
|
||||||
-ENODATA);
|
-ENODATA);
|
||||||
node = dev_read_subnode(dev, "regulator-state-mem");
|
node = dev_read_subnode(dev, "regulator-state-mem");
|
||||||
|
|
|
||||||
|
|
@ -178,6 +178,7 @@ struct dm_regulator_uclass_platdata {
|
||||||
u8 ctrl_reg;
|
u8 ctrl_reg;
|
||||||
u8 volt_reg;
|
u8 volt_reg;
|
||||||
bool suspend_on;
|
bool suspend_on;
|
||||||
|
bool ignore;
|
||||||
u32 suspend_uV;
|
u32 suspend_uV;
|
||||||
u32 ramp_delay;
|
u32 ramp_delay;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue