From 083fc83a4e1187a3f42575c8e3df089d3be622ad Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 23 Jun 2015 15:38:59 -0600 Subject: dm: power: Add a function to set up all regulators The device tree provides information about which regulators should be on at boot, or always on. Use this to set them up automatically. Signed-off-by: Simon Glass Tested-by: Przemyslaw Marczak Acked-by: Przemyslaw Marczak --- include/power/regulator.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/power/regulator.h b/include/power/regulator.h index dd04371140..015229027c 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -315,6 +315,17 @@ int regulator_get_mode(struct udevice *dev); */ int regulator_set_mode(struct udevice *dev, int mode_id); +/** + * regulators_enable_boot_on() - enable regulators needed for boot + * + * This enables all regulators which are marked to be on at boot time. This + * only works for regulators which don't have a range for voltage/current, + * since in that case it is not possible to know which value to use. + * + * This effectively calls regulator_autoset() for every regulator. + */ +int regulators_enable_boot_on(bool verbose); + /** * regulator_autoset: setup the voltage/current on a regulator * -- cgit v1.2.3