Skip to content

Commit fbe5956

Browse files
justephjic23
authored andcommitted
dt-bindings: iio: adc: ad7380: fix ad7380-4 reference supply
ad7380-4 is the only device from ad738x family that doesn't have an internal reference. Moreover its external reference is called REFIN in the datasheet while all other use REFIO as an optional external reference. If refio-supply is omitted the internal reference is used. Fix the binding by adding refin-supply and makes it required for ad7380-4 only. Fixes: 1a291cc ("dt-bindings: iio: adc: ad7380: add support for ad738x-4 4 channels variants") Acked-by: Conor Dooley <[email protected]> Reviewed-by: David Lechner <[email protected]> Signed-off-by: Julien Stephan <[email protected]> Link: https://patch.msgid.link/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 63dd163 commit fbe5956

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ properties:
6767
A 2.5V to 3.3V supply for the external reference voltage. When omitted,
6868
the internal 2.5V reference is used.
6969

70+
refin-supply:
71+
description:
72+
A 2.5V to 3.3V supply for external reference voltage, for ad7380-4 only.
73+
7074
aina-supply:
7175
description:
7276
The common mode voltage supply for the AINA- pin on pseudo-differential
@@ -135,6 +139,23 @@ allOf:
135139
ainc-supply: false
136140
aind-supply: false
137141

142+
# ad7380-4 uses refin-supply as external reference.
143+
# All other chips from ad738x family use refio as optional external reference.
144+
# When refio-supply is omitted, internal reference is used.
145+
- if:
146+
properties:
147+
compatible:
148+
enum:
149+
- adi,ad7380-4
150+
then:
151+
properties:
152+
refio-supply: false
153+
required:
154+
- refin-supply
155+
else:
156+
properties:
157+
refin-supply: false
158+
138159
examples:
139160
- |
140161
#include <dt-bindings/interrupt-controller/irq.h>

0 commit comments

Comments
 (0)