diff mbox series

dt-bindings: mfd: samsung,s5m8767: Simplify excluding properties

Message ID 20230619101424.25897-1-krzysztof.kozlowski@linaro.org (mailing list archive)
State Accepted
Commit 7c8cb341fd6667bf2a3dc19c801500af2c92f3f0
Headers show
Series dt-bindings: mfd: samsung,s5m8767: Simplify excluding properties | expand

Commit Message

Krzysztof Kozlowski June 19, 2023, 10:14 a.m. UTC
Mutually exclusive s5m8767,pmic-buck[234]-uses-gpio-dvs properties can
be written simpler, with half of the lines of code.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/mfd/samsung,s5m8767.yaml         | 25 ++++++-------------
 1 file changed, 7 insertions(+), 18 deletions(-)

Comments

Conor Dooley June 19, 2023, 9:16 p.m. UTC | #1
On Mon, Jun 19, 2023 at 12:14:24PM +0200, Krzysztof Kozlowski wrote:
> Mutually exclusive s5m8767,pmic-buck[234]-uses-gpio-dvs properties can
> be written simpler, with half of the lines of code.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.
Lee Jones June 21, 2023, 5:56 p.m. UTC | #2
On Mon, 19 Jun 2023, Krzysztof Kozlowski wrote:

> Mutually exclusive s5m8767,pmic-buck[234]-uses-gpio-dvs properties can
> be written simpler, with half of the lines of code.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/mfd/samsung,s5m8767.yaml         | 25 ++++++-------------
>  1 file changed, 7 insertions(+), 18 deletions(-)

Applied, thanks
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/samsung,s5m8767.yaml b/Documentation/devicetree/bindings/mfd/samsung,s5m8767.yaml
index 10c7b408f33a..aea0b7d57d04 100644
--- a/Documentation/devicetree/bindings/mfd/samsung,s5m8767.yaml
+++ b/Documentation/devicetree/bindings/mfd/samsung,s5m8767.yaml
@@ -153,29 +153,18 @@  dependencies:
 additionalProperties: false
 
 allOf:
-  - if:
+  - not:
       required:
         - s5m8767,pmic-buck2-uses-gpio-dvs
-    then:
-      properties:
-        s5m8767,pmic-buck3-uses-gpio-dvs: false
-        s5m8767,pmic-buck4-uses-gpio-dvs: false
-
-  - if:
+        - s5m8767,pmic-buck3-uses-gpio-dvs
+  - not:
+      required:
+        - s5m8767,pmic-buck2-uses-gpio-dvs
+        - s5m8767,pmic-buck4-uses-gpio-dvs
+  - not:
       required:
         - s5m8767,pmic-buck3-uses-gpio-dvs
-    then:
-      properties:
-        s5m8767,pmic-buck2-uses-gpio-dvs: false
-        s5m8767,pmic-buck4-uses-gpio-dvs: false
-
-  - if:
-      required:
         - s5m8767,pmic-buck4-uses-gpio-dvs
-    then:
-      properties:
-        s5m8767,pmic-buck2-uses-gpio-dvs: false
-        s5m8767,pmic-buck3-uses-gpio-dvs: false
 
 examples:
   - |