Skip to content

Commit

Permalink
regulator: core: Mark all DT based boards as having full constraints
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Jul 6, 2012
1 parent 6887a41 commit 86f5fcf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 86f5fcf

Please sign in to comment.