Thread (13 messages) 13 messages, 2 authors, 2021-07-09

RE: [PATCH v1 4/4] dt-bindings: iio: adc: ad7949: add adi,reference-source

flat view

From: Liam Beguin <hidden>
Date: 2021-07-09 14:28:44
Also in: linux-iio, lkml

On Fri Jul 9, 2021 at 4:15 AM EDT, Sa, Nuno wrote:
quoted
-----Original Message-----
From: Liam Beguin <redacted>
Sent: Friday, July 9, 2021 1:56 AM
To: liambeguin@gmail.com; lars@metafoo.de; Hennerich, Michael
[off-list ref]; jic23@kernel.org; charles-
antoine.couret@essensium.com
Cc: linux-kernel@vger.kernel.org; linux-iio@vger.kernel.org;
devicetree@vger.kernel.org; robh+dt@kernel.org
Subject: [PATCH v1 4/4] dt-bindings: iio: adc: ad7949: add
adi,reference-source

[External]

From: Liam Beguin <redacted>

Add bindings documentation for the adi,reference-source property.
This property is required to properly configure the ADC sample request
based on which reference source should be used for the calculation.

Signed-off-by: Liam Beguin <redacted>
---
 .../bindings/iio/adc/adi,ad7949.yaml          | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git
a/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml
b/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml
index 9b56bd4d5510..3f4629281cc8 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml
@@ -35,6 +35,28 @@ properties:
   "#io-channel-cells":
     const: 1

+  adi,reference-select:
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32
+      - enum: [0, 1, 2, 3, 6, 7]
+
+    default: 7
+    description: |
+      Select the reference voltage source to use when converting
samples.
+      Acceptable values are:
+      - 0: Internal reference and temperature sensor enabled.
+           Vref=2.5V, buffered output
+      - 1: Internal reference and temperature sensor enabled.
+           Vref=4.096V, buffered output
+      - 2: Use external reference, temperature sensor enabled.
+           Internal buffer disabled
+      - 3: Use external reference, internal buffer and temperature
sensor
+           enabled.
+      - 6: Use external reference, internal buffer and temperature
sensor
+           disabled.
+      - 7: Use external reference, internal buffer enabled.
+           Internal reference and temperature sensor disabled.
I think typically the description comes first. I also don't think you
need the 'allOf'(not even sure if it will pass the binding check)...
Just have '$ref' and 'enum' on the same level.
I realize I misread your comment on the order of the description. I'll
move it at the top of the binding definition.

Liam
- Nuno Sá
quoted
 required:
   - compatible
   - reg
--
2.30.1.489.g328c10930387
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help