提交 130daa3f 编写于 作者: S Stephen Boyd 提交者: Mark Brown

regulator: of: Skip disabled regulator nodes

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: NStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 b787f68c
...@@ -292,7 +292,7 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev, ...@@ -292,7 +292,7 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
return NULL; 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); name = of_get_property(child, "regulator-compatible", NULL);
if (!name) if (!name)
name = child->name; name = child->name;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册