[PATCH REBASED 1/2] dt-bindings: nvmem: extract NVMEM cell to separated file
Rob Herring
robh at kernel.org
Fri Feb 11 04:50:33 PST 2022
On Wed, Jan 26, 2022 at 08:07:44AM +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal at milecki.pl>
>
> This will allow adding binding for more specific cells and reusing
> (sharing) common code.
>
> Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
> ---
> .../devicetree/bindings/nvmem/cells/cell.yaml | 34 +++++++++++++++++++
Why the 'cells' subdir? cell.yaml is a bit generic for me as DT defines
'cell' which is different from nvmem cell. While we have the path to
distinguish, '$ref: cell.yaml' doesn't.
> .../devicetree/bindings/nvmem/nvmem.yaml | 22 +-----------
> 2 files changed, 35 insertions(+), 21 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/nvmem/cells/cell.yaml
>
> diff --git a/Documentation/devicetree/bindings/nvmem/cells/cell.yaml b/Documentation/devicetree/bindings/nvmem/cells/cell.yaml
> new file mode 100644
> index 000000000000..adfc2e639f43
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/cells/cell.yaml
> @@ -0,0 +1,34 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/nvmem/cells/cell.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NVMEM cell
> +
> +maintainers:
> + - Srinivas Kandagatla <srinivas.kandagatla at linaro.org>
> +
> +description: NVMEM cell is a data entry of NVMEM device.
> +
> +properties:
> + reg:
> + maxItems: 1
> + description:
> + Offset and size in bytes within the storage device.
> +
> + bits:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + items:
> + - minimum: 0
> + maximum: 7
> + description:
> + Offset in bit within the address range specified by reg.
> + - minimum: 1
> + description:
> + Size in bit within the address range specified by reg.
> +
> +required:
> + - reg
> +
> +additionalProperties: true
> diff --git a/Documentation/devicetree/bindings/nvmem/nvmem.yaml b/Documentation/devicetree/bindings/nvmem/nvmem.yaml
> index 43ed7e32e5ac..b79b51e98ee8 100644
> --- a/Documentation/devicetree/bindings/nvmem/nvmem.yaml
> +++ b/Documentation/devicetree/bindings/nvmem/nvmem.yaml
> @@ -41,27 +41,7 @@ properties:
>
> patternProperties:
> "@[0-9a-f]+(,[0-7])?$":
> - type: object
> -
> - properties:
> - reg:
> - maxItems: 1
> - description:
> - Offset and size in bytes within the storage device.
> -
> - bits:
> - $ref: /schemas/types.yaml#/definitions/uint32-array
> - items:
> - - minimum: 0
> - maximum: 7
> - description:
> - Offset in bit within the address range specified by reg.
> - - minimum: 1
> - description:
> - Size in bit within the address range specified by reg.
> -
> - required:
> - - reg
> + $ref: cells/cell.yaml#
>
> additionalProperties: true
>
> --
> 2.31.1
>
>
More information about the linux-arm-kernel
mailing list