[PATCH 3/5] dt-bindings: nvmem: allow referencing device defined cells by names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Rafał Miłecki <rafal@xxxxxxxxxx>

Not every NVMEM has predefined cells at hardcoded addresses. Some
devices store cells in internal structs and custom formats. Referencing
such cells is still required to let other bindings use them.

Modify binding to require "reg" xor "label". The later one can be used
to match "dynamic" NVMEM cells by their names.

Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>
---
 Documentation/devicetree/bindings/nvmem/nvmem.yaml | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/nvmem/nvmem.yaml b/Documentation/devicetree/bindings/nvmem/nvmem.yaml
index 3392405ee010..83154df25c27 100644
--- a/Documentation/devicetree/bindings/nvmem/nvmem.yaml
+++ b/Documentation/devicetree/bindings/nvmem/nvmem.yaml
@@ -43,6 +43,12 @@ patternProperties:
   "@[0-9a-f]+(,[0-7])?$":
     type: object
 
+    description: |
+      NVMEM cell - a part of NVMEM containing one specific information.
+
+      Cells can be fully defined by a binding or stored in NVMEM device specific
+      data and just referenced in DT by a name (label).
+
     properties:
       reg:
         maxItems: 1
@@ -64,8 +70,11 @@ patternProperties:
               description:
                 Size in bit within the address range specified by reg.
 
-    required:
-      - reg
+    oneOf:
+      - required:
+          - reg
+      - required:
+          - label
 
 additionalProperties: true
 
-- 
2.31.1




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux