diff mbox series

[v2,14/20] dt-bindings: mtd: relax the nvmem compatible string

Message ID 20220901221857.2600340-15-michael@walle.cc (mailing list archive)
State New, archived
Headers show
Series nvmem: core: introduce NVMEM layouts | expand

Commit Message

Michael Walle Sept. 1, 2022, 10:18 p.m. UTC
The "user-otp" and "factory-otp" compatible string just depicts a
generic NVMEM device. But an actual device tree node might as well
contain a more specific compatible string. Make it possible to add
more specific binding elsewhere and just match part of the compatibles
here.

Signed-off-by: Michael Walle <michael@walle.cc>
---
changes since v1:
 - fix typo in commit message

 Documentation/devicetree/bindings/mtd/mtd.yaml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Krzysztof Kozlowski Sept. 8, 2022, 12:21 p.m. UTC | #1
On 02/09/2022 00:18, Michael Walle wrote:
> The "user-otp" and "factory-otp" compatible string just depicts a
> generic NVMEM device. But an actual device tree node might as well
> contain a more specific compatible string. Make it possible to add
> more specific binding elsewhere and just match part of the compatibles
> here.
> 
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
> changes since v1:
>  - fix typo in commit message


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
index 3498e485679b..25b91f25fcf4 100644
--- a/Documentation/devicetree/bindings/mtd/mtd.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
@@ -33,9 +33,10 @@  patternProperties:
 
     properties:
       compatible:
-        enum:
-          - user-otp
-          - factory-otp
+        contains:
+          enum:
+            - user-otp
+            - factory-otp
 
     required:
       - compatible