Skip to contentSkip to conversation

regulator: core: Mark all DT based boards as having full constraints

PATCH In review Mark Brown 2 participants 2 messages Jul 6, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 regulator: core: Mark all DT based boards as having full constraints

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.

---
 drivers/regulator/core.c |    9 +++++++++
 1 file changed, 9 insertions(+)
drivers/regulator/core.c +9 -0
index 270d9a2..9a70d9c 100644
@@ -3578,6 +3578,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
Signature · 1 line
1.7.10