msm: copper: Call regulator_has_full_constraints() at boot
Calling this function causes the regulator framework to, in a
late_initcall, disable all regulators which have a zero use count
and don't have an always_on constraint.
This has the potential to save power by making sure regulators
are not inadvertently left on, and helps to ensure drivers are
not relying on enabled regulators that they have not explicitly
enabled themselves.
Change-Id: I49c5c82d45b384bfb9afd141a3eab6ea0726cb4b
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-copper.c b/arch/arm/mach-msm/board-copper.c
index 2da621f..eff5490 100644
--- a/arch/arm/mach-msm/board-copper.c
+++ b/arch/arm/mach-msm/board-copper.c
@@ -27,6 +27,7 @@
#include <linux/android_pmem.h>
#endif
#include <linux/regulator/stub-regulator.h>
+#include <linux/regulator/machine.h>
#include <asm/mach/map.h>
#include <asm/hardware/gic.h>
#include <mach/board.h>
@@ -482,6 +483,8 @@
msm_clock_init(&msmcopper_clock_init_data);
*adata = msm_copper_auxdata_lookup;
+
+ regulator_has_full_constraints();
}
void __init msm_copper_very_early(void)