[v2] regulator: dt-bindings: add missing unevaluatedProperties for each regulator
Commit Message
Each regulator node, which references common regulator.yaml schema,
should disallow additional or unevaluated properties. Otherwise
mistakes in properties will go unnoticed.
Reported-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Closes: https://git.codelinaro.org/linaro/qcomlt/kernel/-/commit/1c8aeef8a6e84520b77f0c270d99c8bf692c5933
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Changes in v2:
1. Rebase, drop patches from work-in-progress branch
---
Documentation/devicetree/bindings/regulator/mps,mp5416.yaml | 2 ++
Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml | 2 ++
Documentation/devicetree/bindings/regulator/pfuze100.yaml | 4 ++++
.../devicetree/bindings/regulator/qcom,rpmh-regulator.yaml | 2 ++
.../devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 1 +
.../bindings/regulator/richtek,rt4831-regulator.yaml | 1 +
.../bindings/regulator/richtek,rtmv20-regulator.yaml | 1 +
.../bindings/regulator/richtek,rtq6752-regulator.yaml | 1 +
.../devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml | 2 +-
Documentation/devicetree/bindings/regulator/wlf,arizona.yaml | 2 ++
10 files changed, 17 insertions(+), 1 deletion(-)
Comments
On Wed, Jul 26, 2023 at 09:49:40AM +0200, Krzysztof Kozlowski wrote:
> Each regulator node, which references common regulator.yaml schema,
> should disallow additional or unevaluated properties. Otherwise
> mistakes in properties will go unnoticed.
>
> Reported-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> Closes: https://git.codelinaro.org/linaro/qcomlt/kernel/-/commit/1c8aeef8a6e84520b77f0c270d99c8bf692c5933
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Humm, I have a meta-schema to check this and did a pass fixing them, but
seems some of them I missed. I'll have to check the meta-schema (still
some false positives in it, so I haven't committed it)
>
> ---
>
> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>
> Changes in v2:
> 1. Rebase, drop patches from work-in-progress branch
> ---
> Documentation/devicetree/bindings/regulator/mps,mp5416.yaml | 2 ++
> Documentation/devicetree/bindings/regulator/mps,mpq7920.yaml | 2 ++
> Documentation/devicetree/bindings/regulator/pfuze100.yaml | 4 ++++
> .../devicetree/bindings/regulator/qcom,rpmh-regulator.yaml | 2 ++
> .../devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 1 +
> .../bindings/regulator/richtek,rt4831-regulator.yaml | 1 +
> .../bindings/regulator/richtek,rtmv20-regulator.yaml | 1 +
> .../bindings/regulator/richtek,rtq6752-regulator.yaml | 1 +
> .../devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml | 2 +-
> Documentation/devicetree/bindings/regulator/wlf,arizona.yaml | 2 ++
> 10 files changed, 17 insertions(+), 1 deletion(-)
Reviewed-by: Rob Herring <robh@kernel.org>
On Wed, 26 Jul 2023 09:49:40 +0200, Krzysztof Kozlowski wrote:
> Each regulator node, which references common regulator.yaml schema,
> should disallow additional or unevaluated properties. Otherwise
> mistakes in properties will go unnoticed.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: dt-bindings: add missing unevaluatedProperties for each regulator
commit: d2d54819779e1ec0d7908ec98220fa54e72adc48
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
@@ -29,10 +29,12 @@ properties:
patternProperties:
"^buck[1-4]$":
$ref: regulator.yaml#
+ unevaluatedProperties: false
type: object
"^ldo[1-4]$":
$ref: regulator.yaml#
+ unevaluatedProperties: false
type: object
additionalProperties: false
@@ -38,11 +38,13 @@ properties:
ldortc:
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
patternProperties:
"^ldo[1-4]$":
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
"^buck[1-4]$":
type: object
@@ -68,18 +68,22 @@ properties:
"^sw([1-4]|[1-4][a-c]|[1-4][a-c][a-c])$":
$ref: regulator.yaml#
type: object
+ unevaluatedProperties: false
"^vgen[1-6]$":
$ref: regulator.yaml#
type: object
+ unevaluatedProperties: false
"^vldo[1-4]$":
$ref: regulator.yaml#
type: object
+ unevaluatedProperties: false
"^(vsnvs|vref|vrefddr|swbst|coin|v33|vccsd)$":
$ref: regulator.yaml#
type: object
+ unevaluatedProperties: false
additionalProperties: false
@@ -111,6 +111,7 @@ properties:
bob:
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
description: BOB regulator node.
dependencies:
regulator-allow-set-load: [ regulator-allowed-modes ]
@@ -119,6 +120,7 @@ patternProperties:
"^(smps|ldo|lvs|bob)[0-9]+$":
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
description: smps/ldo regulator nodes(s).
dependencies:
regulator-allow-set-load: [ regulator-allowed-modes ]
@@ -110,6 +110,7 @@ patternProperties:
"^((s|l|lvs|5vs)[0-9]*)|(boost-bypass)|(bob)$":
description: List of regulators and its properties
$ref: regulator.yaml#
+ unevaluatedProperties: false
additionalProperties: false
@@ -29,6 +29,7 @@ patternProperties:
"^DSV(LCM|P|N)$":
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
description:
Properties for single Display Bias Voltage regulator.
@@ -121,6 +121,7 @@ properties:
description: load switch current regulator description.
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
required:
- compatible
@@ -35,6 +35,7 @@ properties:
"^(p|n)avdd$":
type: object
$ref: regulator.yaml#
+ unevaluatedProperties: false
description: |
regulator description for pavdd and navdd.
@@ -25,8 +25,8 @@ properties:
patternProperties:
"^(reg11|reg18|usb33)$":
type: object
-
$ref: regulator.yaml#
+ unevaluatedProperties: false
required:
- compatible
@@ -29,11 +29,13 @@ properties:
Initial data for the LDO1 regulator.
$ref: regulator.yaml#
type: object
+ unevaluatedProperties: false
micvdd:
description:
Initial data for the MICVDD regulator.
$ref: regulator.yaml#
type: object
+ unevaluatedProperties: false
additionalProperties: true