[PATCH 4/4] dt-bindings: mfd: syscon: require specific compatible also for simple-mfd

Krzysztof Kozlowski posted 4 patches 3 years, 7 months ago
[PATCH 4/4] dt-bindings: mfd: syscon: require specific compatible also for simple-mfd
Posted by Krzysztof Kozlowski 3 years, 7 months ago
The syscon bindings require a device specific compatible, beside the
"syscon".  However schema counts "simple-mfd" as such, which allows
simple-mfd+syscon to sneak in.

Adjust the match to be sure simple-mfd also comes with a device specific
compatible.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/mfd/syscon.yaml | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index c958086a5fc3..a64c7a71e6fe 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -72,7 +72,7 @@ properties:
       - contains:
           const: syscon
         minItems: 2
-        maxItems: 4  # Should be enough
+        maxItems: 5  # Should be enough
 
   reg:
     maxItems: 1
@@ -93,6 +93,18 @@ required:
   - compatible
   - reg
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: simple-mfd
+    then:
+      properties:
+        compatible:
+          minItems: 3
+          maxItems: 5
+
 additionalProperties: true
 
 examples:
-- 
2.34.1
Re: [PATCH 4/4] dt-bindings: mfd: syscon: require specific compatible also for simple-mfd
Posted by Lee Jones 3 years, 7 months ago
On Wed, 17 Aug 2022, Krzysztof Kozlowski wrote:

> The syscon bindings require a device specific compatible, beside the
> "syscon".  However schema counts "simple-mfd" as such, which allows
> simple-mfd+syscon to sneak in.
> 
> Adjust the match to be sure simple-mfd also comes with a device specific
> compatible.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/mfd/syscon.yaml | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]