Skip to content

Commit

Permalink
regulator: of: Skip disabled regulator nodes
Browse files Browse the repository at this point in the history
If a regulator is listed in devicetree, but the node is marked as
"disabled" we should skip parsing the regulator init data and
deny consumers from interacting with the regulator. This
simplifies devicetree maintenance where we can have one dtsi file
with all regulators supported by a PMIC and then select what
regulators are used depending on the board configuration.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Stephen Boyd authored and Mark Brown committed May 13, 2015
1 parent b787f68 commit 130daa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/of_regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
return NULL;
}

for_each_child_of_node(search, child) {
for_each_available_child_of_node(search, child) {
name = of_get_property(child, "regulator-compatible", NULL);
if (!name)
name = child->name;
Expand Down

0 comments on commit 130daa3

Please sign in to comment.