Message ID | 20220906201959.69920-1-ahalaney@redhat.com |
---|---|
State | Accepted |
Commit | 08865c2150392f67769a9d6e0b02800be226a990 |
Headers | show |
Series | [v2] regulator: dt-bindings: qcom,rpmh: Indicate regulator-allow-set-load dependencies | expand |
diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml index 9a36bee750af..92ff4d59ba20 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml @@ -99,12 +99,16 @@ properties: type: object $ref: "regulator.yaml#" description: BOB regulator node. + dependencies: + regulator-allow-set-load: ["regulator-allowed-modes"] patternProperties: "^(smps|ldo|lvs)[0-9]+$": type: object $ref: "regulator.yaml#" description: smps/ldo regulator nodes(s). + dependencies: + regulator-allow-set-load: ["regulator-allowed-modes"] required: - compatible
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. 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 Suggested-by: Johan Hovold <johan@kernel.org> Signed-off-by: Andrew Halaney <ahalaney@redhat.com> --- v1: https://lore.kernel.org/linux-arm-msm/20220902185148.635292-1-ahalaney@redhat.com/ Changes since v1: - Dropped first two patches in the series as they were user error (thanks Krzysztof for highlighting this!) - No change in the remaining patch Krzysztof also asked if this patch in particular should apply to other regulators, which I think it should for those regulator's who implement set_mode(). Unfortunately I don't know of a good way to get that information in order to apply it at a broader scope for devicetree regulator validation. At least with this in place RPMH users can get better coverage... if someone has suggestions for how to broaden the scope I'm all ears! Thanks, Andrew .../devicetree/bindings/regulator/qcom,rpmh-regulator.yaml | 4 ++++ 1 file changed, 4 insertions(+)