regulator: core: Mark all DT based boards as having full constraints
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 6 Jul 2012 17:19:13 +0000 (18:19 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 6 Jul 2012 17:57:33 +0000 (18:57 +0100)
Since DT doesn't provide an idiomatic mechanism for enabling full
constraints and since it's much more natural with DT to provide them
just assume that a DT enabled system has full constraints.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
drivers/regulator/core.c

index 09a737c868b573227d22226926a081f35a29e6b2..4c53b39b92a6e2acc7056586410a8eac9fa64d93 100644 (file)
@@ -3472,6 +3472,15 @@ static int __init regulator_init_complete(void)
        struct regulation_constraints *c;
        int enabled, ret;
 
+       /*
+        * Since DT doesn't provide an idiomatic mechanism for
+        * enabling full constraints and since it's much more natural
+        * with DT to provide them just assume that a DT enabled
+        * system has full constraints.
+        */
+       if (of_have_populated_dt())
+               has_full_constraints = true;
+
        mutex_lock(&regulator_list_mutex);
 
        /* If we have a full configuration then disable any regulators