All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings:iio:dac:microchip,mcp4725: fix properties for mcp4726
@ 2020-12-16 10:13 Tomas Novotny
  2020-12-21 19:27 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Tomas Novotny @ 2020-12-16 10:13 UTC (permalink / raw)
  To: linux-iio, devicetree
  Cc: Jonathan Cameron, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Rob Herring, Tomas Novotny, Jonathan Cameron

The vdd-supply property is optional if vref-supply is provided for
mcp4726.

Also the microchip,vref-buffered makes sense only if vref-supply is
specified.

Spotted by Jonathan during conversion to yaml.

Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Tomas Novotny <tomas@novotny.cz>
---
 .../bindings/iio/dac/microchip,mcp4725.yaml   | 31 +++++++++++++++----
 1 file changed, 25 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/dac/microchip,mcp4725.yaml b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4725.yaml
index 271998610ceb..079f302d1349 100644
--- a/Documentation/devicetree/bindings/iio/dac/microchip,mcp4725.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4725.yaml
@@ -39,20 +39,39 @@ properties:
 
 allOf:
   - if:
-      not:
-        properties:
-          compatible:
-            contains:
-              const: microchip,mcp4726
+      properties:
+        compatible:
+          contains:
+            const: microchip,mcp4725
     then:
       properties:
         vref-supply: false
+      required:
+        - vdd-supply
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: microchip,mcp4726
+    then:
+      anyOf:
+        - required:
+          - vdd-supply
+        - required:
+          - vref-supply
+
+  - if:
+      not:
+        required:
+          - vref-supply
+    then:
+      properties:
         microchip,vref-buffered: false
 
 required:
   - compatible
   - reg
-  - vdd-supply
 
 additionalProperties: false
 
-- 
2.26.2


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

* Re: [PATCH] dt-bindings:iio:dac:microchip,mcp4725: fix properties for mcp4726
  2020-12-16 10:13 [PATCH] dt-bindings:iio:dac:microchip,mcp4725: fix properties for mcp4726 Tomas Novotny
@ 2020-12-21 19:27 ` Rob Herring
  2020-12-29 17:46   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2020-12-21 19:27 UTC (permalink / raw)
  To: Tomas Novotny
  Cc: devicetree, Jonathan Cameron, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Jonathan Cameron, Rob Herring, linux-iio

On Wed, 16 Dec 2020 11:13:16 +0100, Tomas Novotny wrote:
> The vdd-supply property is optional if vref-supply is provided for
> mcp4726.
> 
> Also the microchip,vref-buffered makes sense only if vref-supply is
> specified.
> 
> Spotted by Jonathan during conversion to yaml.
> 
> Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Signed-off-by: Tomas Novotny <tomas@novotny.cz>
> ---
>  .../bindings/iio/dac/microchip,mcp4725.yaml   | 31 +++++++++++++++----
>  1 file changed, 25 insertions(+), 6 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH] dt-bindings:iio:dac:microchip,mcp4725: fix properties for mcp4726
  2020-12-21 19:27 ` Rob Herring
@ 2020-12-29 17:46   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2020-12-29 17:46 UTC (permalink / raw)
  To: Rob Herring
  Cc: Tomas Novotny, devicetree, Jonathan Cameron, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Rob Herring, linux-iio

On Mon, 21 Dec 2020 12:27:38 -0700
Rob Herring <robh@kernel.org> wrote:

> On Wed, 16 Dec 2020 11:13:16 +0100, Tomas Novotny wrote:
> > The vdd-supply property is optional if vref-supply is provided for
> > mcp4726.
> > 
> > Also the microchip,vref-buffered makes sense only if vref-supply is
> > specified.
> > 
> > Spotted by Jonathan during conversion to yaml.
> > 
> > Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Signed-off-by: Tomas Novotny <tomas@novotny.cz>
I'm taking this this slow way as we are just providing slightly more flexible
conditions rather than allowing anything we suspect anyone is already using.

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to probably ignore it ;)

Thanks for tidying this up.

Jonathan

> > ---
> >  .../bindings/iio/dac/microchip,mcp4725.yaml   | 31 +++++++++++++++----
> >  1 file changed, 25 insertions(+), 6 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>


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

end of thread, other threads:[~2020-12-29 17:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 10:13 [PATCH] dt-bindings:iio:dac:microchip,mcp4725: fix properties for mcp4726 Tomas Novotny
2020-12-21 19:27 ` Rob Herring
2020-12-29 17:46   ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.