devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: mfd: x-powers,axp152: simplify disallowing properties
@ 2023-03-25 11:43 Krzysztof Kozlowski
  2023-03-28 14:03 ` Andre Przywara
  2023-03-30 13:33 ` Lee Jones
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-25 11:43 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Chen-Yu Tsai,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski, Andre Przywara

The syntax to disallow x-powers,drive-vbus-en,
x-powers,self-working-mode and x-powers,master-mode for certain variants
can be made simpler.  Also this produces much nicer warning message when
the condition hits wrong DTS.

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

---

Cc: Andre Przywara <andre.przywara@arm.com>
---
 .../devicetree/bindings/mfd/x-powers,axp152.yaml | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
index 24d03996b93a..8eeb5b387430 100644
--- a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
+++ b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
@@ -47,9 +47,8 @@ allOf:
               - x-powers,axp209
 
     then:
-      not:
-        required:
-          - x-powers,drive-vbus-en
+      properties:
+        x-powers,drive-vbus-en: false
 
   - if:
       not:
@@ -59,14 +58,9 @@ allOf:
               const: x-powers,axp806
 
     then:
-      allOf:
-        - not:
-            required:
-              - x-powers,self-working-mode
-
-        - not:
-            required:
-              - x-powers,master-mode
+      properties:
+        x-powers,self-working-mode: false
+        x-powers,master-mode: false
 
   - if:
       not:
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-30 13:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-25 11:43 [PATCH] dt-bindings: mfd: x-powers,axp152: simplify disallowing properties Krzysztof Kozlowski
2023-03-28 14:03 ` Andre Przywara
2023-03-28 14:08   ` Chen-Yu Tsai
2023-03-30 13:33 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).