regulator: of: Skip disabled regulator nodes
PATCH 1/1 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.
--- drivers/regulator/of_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/of_regulator.c +1 -1
@@ -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;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Mark Brown
maintainerQuoted 3 lines · Stephen Boyd
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
Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150513/dfd5fe5e/attachment.sig>