Message ID | 20220909151413.1164754-4-nuno.sa@analog.com |
---|---|
State | New |
Headers | show |
Series | [1/3] iio: adc: ad7923: fix channel readings for some variants | expand |
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 --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
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(+)