Skip to content

Commit 08865c2

Browse files
ahalaneybroonie
authored andcommitted
regulator: dt-bindings: qcom,rpmh: Indicate regulator-allow-set-load dependencies
For RPMH regulators it doesn't make sense to indicate regulator-allow-set-load without saying what modes you can switch to, so be sure to indicate a dependency on regulator-allowed-modes. In general this is true for any regulators that are setting modes instead of setting a load directly, for example RPMH regulators. A counter example would be RPM based regulators, which set a load change directly instead of a mode change. In the RPM case regulator-allow-set-load alone is sufficient to describe the regulator (the regulator can change its output current, here's the new load), but in the RPMH case what valid operating modes exist must also be stated to properly describe the regulator (the new load is this, what is the optimum mode for this regulator with that load, let's change to that mode now). With this in place devicetree validation can catch issues like this: /mnt/extrassd/git/linux-next/arch/arm64/boot/dts/qcom/sm8350-hdk.dtb: pm8350-rpmh-regulators: ldo5: 'regulator-allowed-modes' is a dependency of 'regulator-allow-set-load' From schema: /mnt/extrassd/git/linux-next/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml Where the RPMH regulator hardware is described as being settable, but there are no modes described to set it to! Suggested-by: Johan Hovold <[email protected]> Reviewed-by: Johan Hovold <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Andrew Halaney <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 587bfe3 commit 08865c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,16 @@ properties:
9999
type: object
100100
$ref: "regulator.yaml#"
101101
description: BOB regulator node.
102+
dependencies:
103+
regulator-allow-set-load: ["regulator-allowed-modes"]
102104

103105
patternProperties:
104106
"^(smps|ldo|lvs)[0-9]+$":
105107
type: object
106108
$ref: "regulator.yaml#"
107109
description: smps/ldo regulator nodes(s).
110+
dependencies:
111+
regulator-allow-set-load: ["regulator-allowed-modes"]
108112

109113
required:
110114
- compatible

0 commit comments

Comments
 (0)