diff mbox series

[3/3] dt-bindings: iio: adi,ad7923: add range-select property

Message ID 20220909151413.1164754-4-nuno.sa@analog.com (mailing list archive)
State Changes Requested
Headers show
Series ad7923 fixes and full range support | expand

Commit Message

Nuno Sa Sept. 9, 2022, 3:14 p.m. UTC
Document the new property to select the desired analog input range.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
 Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Jonathan Cameron Sept. 11, 2022, 11:28 a.m. UTC | #1
On Fri, 9 Sep 2022 17:14:13 +0200
Nuno Sá <nuno.sa@analog.com> wrote:

> Document the new property to select the desired analog input range.
> 
> Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> ---
>  Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
> index 40b0a887db57..9041020bdb81 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
> @@ -36,6 +36,14 @@ properties:
>      description: |
>        The regulator supply for ADC reference voltage.
>  
> +  adi,range-select:
> +    description: Selects the analog input range.
> +      0 - 0 to 2xVREF
> +      1 - 0 to VREF
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [0, 1]
> +    default: 1
> +

Would this be better as a flag / boolean called something like
adi,range-double?

>    '#address-cells':
>      const: 1
>
Nuno Sá Sept. 12, 2022, 7:04 a.m. UTC | #2
On Sun, 2022-09-11 at 12:28 +0100, Jonathan Cameron wrote:
> On Fri, 9 Sep 2022 17:14:13 +0200
> Nuno Sá <nuno.sa@analog.com> wrote:
> 
> > Document the new property to select the desired analog input range.
> > 
> > Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> > ---
> >  Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml | 8
> > ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
> > b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
> > index 40b0a887db57..9041020bdb81 100644
> > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
> > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
> > @@ -36,6 +36,14 @@ properties:
> >      description: |
> >        The regulator supply for ADC reference voltage.
> >  
> > +  adi,range-select:
> > +    description: Selects the analog input range.
> > +      0 - 0 to 2xVREF
> > +      1 - 0 to VREF
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    enum: [0, 1]
> > +    default: 1
> > +
> 
> Would this be better as a flag / boolean called something like
> adi,range-double?
> 

In my first draft I actually had something like 'adi,range-disable' but
that felt strange and hacky... Your boolean suggestion is much better
and I have no problems in changing (as the code will also be simpler).
> 

- Nuno Sá
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
index 40b0a887db57..9041020bdb81 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
@@ -36,6 +36,14 @@  properties:
     description: |
       The regulator supply for ADC reference voltage.
 
+  adi,range-select:
+    description: Selects the analog input range.
+      0 - 0 to 2xVREF
+      1 - 0 to VREF
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0, 1]
+    default: 1
+
   '#address-cells':
     const: 1