diff options
author | Tom Rini <trini@konsulko.com> | 2021-04-29 08:21:55 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-04-29 08:21:55 -0400 |
commit | a26522e77477531fc1025b27cebb45de9fc5a3db (patch) | |
tree | fc87c8b76aba917ecd3ce0b31786cbd56c519352 /include/power/regulator.h | |
parent | c306b24948acb23798e2fd80f56ae09363a6f9f7 (diff) | |
parent | eccbd4ad8e4e182638eafbfb87ac139c04f24a01 (diff) |
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- Add base support for Marvell OcteonTX2 CN9130 CRB (mostly done
by Kostya)
- Sync Armada 3k/7k/8k SERDES code with Marvell version (misc Marvell
authors)
- pci-aardvark: Fix processing PIO transfers (Pali)
Diffstat (limited to 'include/power/regulator.h')
-rw-r--r-- | include/power/regulator.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/power/regulator.h b/include/power/regulator.h index da9a065bdd..fad87c99e5 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -151,6 +151,7 @@ enum regulator_flag { * @max_uA* - maximum amperage (micro Amps) * @always_on* - bool type, true or false * @boot_on* - bool type, true or false + * @force_off* - bool type, true or false * TODO(sjg@chromium.org): Consider putting the above two into @flags * @ramp_delay - Time to settle down after voltage change (unit: uV/us) * @flags: - flags value (see REGULATOR_FLAG_...) @@ -176,6 +177,7 @@ struct dm_regulator_uclass_plat { unsigned int ramp_delay; bool always_on; bool boot_on; + bool force_off; const char *name; int flags; u8 ctrl_reg; @@ -421,6 +423,15 @@ int regulator_set_mode(struct udevice *dev, int mode_id); int regulators_enable_boot_on(bool verbose); /** + * regulators_enable_boot_off() - disable regulators needed for boot + * + * This disables all regulators which are marked to be off at boot time. + * + * This effectively calls regulator_unset() for every regulator. + */ +int regulators_enable_boot_off(bool verbose); + +/** * regulator_autoset: setup the voltage/current on a regulator * * The setup depends on constraints found in device's uclass's platform data @@ -440,6 +451,18 @@ int regulators_enable_boot_on(bool verbose); int regulator_autoset(struct udevice *dev); /** + * regulator_unset: turn off a regulator + * + * The setup depends on constraints found in device's uclass's platform data + * (struct dm_regulator_uclass_platdata): + * + * - Disable - will set - if 'force_off' is set to true, + * + * The function returns on the first-encountered error. + */ +int regulator_unset(struct udevice *dev); + +/** * regulator_autoset_by_name: setup the regulator given by its uclass's * platform data name field. The setup depends on constraints found in device's * uclass's platform data (struct dm_regulator_uclass_plat): |