[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220125180114.12286-2-zajec5@gmail.com>
Date: Tue, 25 Jan 2022 19:01:13 +0100
From: Rafał Miłecki <zajec5@...il.com>
To: Rob Herring <robh+dt@...nel.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Michael Walle <michael@...le.cc>
Cc: linux-mtd@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
netdev@...r.kernel.org, Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Shawn Guo <shawnguo@...nel.org>, Li Yang <leoyang.li@....com>,
Frank Rowand <frowand.list@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Ansuel Smith <ansuelsmth@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Hauke Mehrtens <hauke@...ke-m.de>,
Rafał Miłecki <rafal@...ecki.pl>
Subject: [PATCH 1/2] dt-bindings: nvmem: extract NVMEM cell to separated file
From: Rafał Miłecki <rafal@...ecki.pl>
This will allow adding binding for more specific cells and reusing
(sharing) common code.
Signed-off-by: Rafał Miłecki <rafal@...ecki.pl>
---
.../devicetree/bindings/nvmem/cells/cell.yaml | 35 +++++++++++++++++++
.../devicetree/bindings/nvmem/nvmem.yaml | 25 ++-----------
2 files changed, 37 insertions(+), 23 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..5d62d0c8f1e1
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/cells/cell.yaml
@@ -0,0 +1,35 @@
+# 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@...aro.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:
+ maxItems: 1
+ items:
+ 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 456fb808100a..6b075c1db446 100644
--- a/Documentation/devicetree/bindings/nvmem/nvmem.yaml
+++ b/Documentation/devicetree/bindings/nvmem/nvmem.yaml
@@ -40,29 +40,8 @@ properties:
maxItems: 1
patternProperties:
- "@[0-9a-f]+(,[0-7])?$":
- type: object
-
- properties:
- reg:
- maxItems: 1
- description:
- Offset and size in bytes within the storage device.
-
- bits:
- maxItems: 1
- items:
- 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
+ "@[0-9a-f]+$":
+ $ref: cells/cell.yaml#
additionalProperties: true
--
2.31.1
Powered by blists - more mailing lists