dt-bindings: nvmem: move deprecated cells binding to its own file
Subsystems (13)
PATCH 1/1 dt-bindings: nvmem: move deprecated cells binding to its own file
From: Rafał Miłecki <[email protected]>
Support for old NVMEM fixed cells was deprecated in favour of "fixed-layout". It's still part of the nvmem.yaml though and may be unknowingly used by new bindings added without much of analyze.
To make it more difficult to accidentally support old syntax move its binding to separated file with "deprecated" in its name.
--- .../devicetree/bindings/mtd/mtd.yaml | 7 ++++- .../bindings/mtd/partitions/nvmem-cells.yaml | 1 + .../nvmem/amlogic,meson-gxbb-efuse.yaml | 1 + .../bindings/nvmem/amlogic,meson6-efuse.yaml | 1 + .../bindings/nvmem/apple,efuses.yaml | 1 + .../devicetree/bindings/nvmem/imx-ocotp.yaml | 1 + .../bindings/nvmem/mediatek,efuse.yaml | 1 + .../nvmem/microchip,sama7g5-otpc.yaml | 1 + .../devicetree/bindings/nvmem/mxs-ocotp.yaml | 1 + .../nvmem/nvmem-deprecated-cells.yaml | 28 +++++++++++++++++++ .../devicetree/bindings/nvmem/nvmem.yaml | 9 ------ .../bindings/nvmem/qcom,qfprom.yaml | 1 + .../bindings/nvmem/qcom,sec-qfprom.yaml | 1 + .../bindings/nvmem/qcom,spmi-sdam.yaml | 1 + .../bindings/nvmem/rockchip,otp.yaml | 1 + .../bindings/nvmem/rockchip-efuse.yaml | 1 + .../nvmem/socionext,uniphier-efuse.yaml | 1 + .../bindings/nvmem/sunplus,sp7021-ocotp.yaml | 1 + .../bindings/rtc/amlogic,meson6-rtc.yaml | 1 + 19 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/nvmem/nvmem-deprecated-cells.yaml
Documentation/devicetree/bindings/mtd/mtd.yaml +6 -1
@@ -43,7 +43,12 @@ patternProperties: deprecated: true "^otp(-[0-9]+)?$": - $ref: ../nvmem/nvmem.yaml# + type: object + + allOf: + - $ref: ../nvmem/nvmem.yaml# + - $ref: ../nvmem/nvmem-deprecated-cells.yaml# + unevaluatedProperties: false description: |
Documentation/devicetree/bindings/mtd/partitions/nvmem-cells.yaml +1 -0
@@ -19,6 +19,7 @@ maintainers: allOf: - $ref: /schemas/mtd/partitions/partition.yaml# - $ref: /schemas/nvmem/nvmem.yaml# + - $ref: /schemas/nvmem/nvmem-deprecated-cells.yaml# properties: compatible:
Documentation/devicetree/bindings/nvmem/amlogic,meson-gxbb-efuse.yaml +1 -0
@@ -11,6 +11,7 @@ maintainers: allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: compatible:
Documentation/devicetree/bindings/nvmem/amlogic,meson6-efuse.yaml +1 -0
@@ -12,6 +12,7 @@ maintainers: allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: compatible:
Documentation/devicetree/bindings/nvmem/apple,efuses.yaml +1 -0
@@ -16,6 +16,7 @@ maintainers: allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: compatible:
Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml +1 -0
@@ -16,6 +16,7 @@ description: | allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: compatible:
Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml +1 -0
@@ -16,6 +16,7 @@ maintainers: allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: $nodename:
Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml +1 -0
@@ -16,6 +16,7 @@ description: | allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: compatible:
Documentation/devicetree/bindings/nvmem/mxs-ocotp.yaml +1 -0
@@ -11,6 +11,7 @@ maintainers: allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: compatible:
Documentation/devicetree/bindings/nvmem/nvmem-deprecated-cells.yaml new file +28 -0
@@ -0,0 +1,28 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/nvmem-deprecated-cells.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVMEM old syntax for fixed cells + +maintainers: + - Srinivas Kandagatla <[email protected]> + +description: | + Before introducing NVMEM layouts all NVMEM (fixed) cells were defined + as direct device subnodes. That syntax was replaced by "fixed-layout" + and is deprecated now. No new bindings should use it. + +patternProperties: + "@[0-9a-f]+(,[0-7])?$": + type: object + allOf: + - $ref: layouts/fixed-cell.yaml + - properties: + compatible: false + deprecated: true + +additionalProperties: true + +...
Documentation/devicetree/bindings/nvmem/nvmem.yaml +0 -9
@@ -46,15 +46,6 @@ properties: container may reference more advanced (dynamic) layout parsers. -patternProperties: - "@[0-9a-f]+(,[0-7])?$": - type: object - allOf: - - $ref: layouts/fixed-cell.yaml - - properties: - compatible: false - deprecated: true - additionalProperties: true examples:
Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml +1 -0
@@ -11,6 +11,7 @@ maintainers: allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: compatible:
Documentation/devicetree/bindings/nvmem/qcom,sec-qfprom.yaml +1 -0
@@ -16,6 +16,7 @@ description: allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: compatible:
Documentation/devicetree/bindings/nvmem/qcom,spmi-sdam.yaml +1 -0
@@ -16,6 +16,7 @@ description: | allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: compatible:
Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml +1 -0
@@ -49,6 +49,7 @@ required: allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# - if: properties:
Documentation/devicetree/bindings/nvmem/rockchip-efuse.yaml +1 -0
@@ -11,6 +11,7 @@ maintainers: allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: compatible:
Documentation/devicetree/bindings/nvmem/socionext,uniphier-efuse.yaml +1 -0
@@ -12,6 +12,7 @@ maintainers: allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: compatible:
Documentation/devicetree/bindings/nvmem/sunplus,sp7021-ocotp.yaml +1 -0
@@ -12,6 +12,7 @@ maintainers: allOf: - $ref: nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: compatible:
Documentation/devicetree/bindings/rtc/amlogic,meson6-rtc.yaml +1 -0
@@ -13,6 +13,7 @@ maintainers: allOf: - $ref: rtc.yaml# - $ref: /schemas/nvmem/nvmem.yaml# + - $ref: nvmem-deprecated-cells.yaml# properties: compatible:
Signature · 1 line
2.35.3
Rob Herring
maintainerQuoted 24 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
Support for old NVMEM fixed cells was deprecated in favour of "fixed-layout". It's still part of the
nvmem.yamlthough and may be unknowingly used by new bindings added without much of analyze.To make it more difficult to accidentally support old syntax move its binding to separated file with "deprecated" in its name.
Signed-off-by Rafał Miłecki <[email protected]>--- .../devicetree/bindings/mtd/mtd.yaml | 7 ++++- .../bindings/mtd/partitions/nvmem-cells.yaml | 1 + .../nvmem/amlogic,meson-gxbb-efuse.yaml | 1 + .../bindings/nvmem/amlogic,meson6-efuse.yaml | 1 + .../bindings/nvmem/apple,efuses.yaml | 1 + .../devicetree/bindings/nvmem/imx-ocotp.yaml | 1 + .../bindings/nvmem/mediatek,efuse.yaml | 1 + .../nvmem/microchip,sama7g5-otpc.yaml | 1 + .../devicetree/bindings/nvmem/mxs-ocotp.yaml | 1 + .../nvmem/nvmem-deprecated-cells.yaml | 28 +++++++++++++++++++ .../devicetree/bindings/nvmem/nvmem.yaml | 9 ------ .../bindings/nvmem/qcom,qfprom.yaml | 1 + .../bindings/nvmem/qcom,sec-qfprom.yaml | 1 +
Quoted 9 lines
.../bindings/nvmem/qcom,spmi-sdam.yaml | 1 + .../bindings/nvmem/rockchip,otp.yaml | 1 + .../bindings/nvmem/rockchip-efuse.yaml | 1 + .../nvmem/socionext,uniphier-efuse.yaml | 1 + .../bindings/nvmem/sunplus,sp7021-ocotp.yaml | 1 + .../bindings/rtc/amlogic,meson6-rtc.yaml | 1 + 19 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/nvmem/nvmem-deprecated-cells.yaml
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/rtc/amlogic,meson6-rtc.yaml:
Error in referenced schema matching $id: http://devicetree.org/schemas/rtc/nvmem-deprecated-cells.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/rtc/amlogic,meson6-rtc.example.dtb: rtc@740: False schema does not allow {'compatible': ['amlogic,meson6-rtc'], 'reg': [[1856, 20]], 'interrupts': [[0, 72, 1]], 'clocks': [[4294967295]], 'vdd-supply': [[4294967295]], 'resets': [[4294967295]], '#address-cells': [[1]], '#size-cells': [[1]], 'mac@0': {'reg': [[0, 6]]}, '$nodename': ['rtc@740']}
from schema $id: http://devicetree.org/schemas/rtc/amlogic,meson6-rtc.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/rtc/amlogic,meson6-rtc.example.dtb: rtc@740: Unevaluated properties are not allowed ('mac@0' was unexpected)
from schema $id: http://devicetree.org/schemas/rtc/amlogic,meson6-rtc.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.