Skip to content

Commit

Permalink
dt-bindings: nvmem: move deprecated cells binding to its own file
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20231020105545.216052-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Rafał Miłecki authored and Greg Kroah-Hartman committed Oct 21, 2023
1 parent 2cc3b37 commit c533072
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 10 deletions.
7 changes: 6 additions & 1 deletion Documentation/devicetree/bindings/mtd/mtd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ maintainers:

allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

properties:
compatible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ maintainers:

allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

properties:
compatible:
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ maintainers:

allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

properties:
compatible:
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ description: |
allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

properties:
compatible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ maintainers:

allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

properties:
$nodename:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ description: |
allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

properties:
compatible:
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/nvmem/mxs-ocotp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ maintainers:

allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

properties:
compatible:
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <srinivas.kandagatla@linaro.org>

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

...
9 changes: 0 additions & 9 deletions Documentation/devicetree/bindings/nvmem/nvmem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ maintainers:

allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

properties:
compatible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ description:

allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

properties:
compatible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ description: |
allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

properties:
compatible:
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/nvmem/rockchip,otp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ required:

allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

- if:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ maintainers:

allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

properties:
compatible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ maintainers:

allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

properties:
compatible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ maintainers:

allOf:
- $ref: nvmem.yaml#
- $ref: nvmem-deprecated-cells.yaml#

properties:
compatible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ maintainers:
allOf:
- $ref: rtc.yaml#
- $ref: /schemas/nvmem/nvmem.yaml#
- $ref: /schemas/nvmem/nvmem-deprecated-cells.yaml#

properties:
compatible:
Expand Down

0 comments on commit c533072

Please sign in to comment.