Message ID | 20220429220144.1476049-1-gwendal@chromium.org |
---|---|
Headers | show |
Series | iio: sx9324/9360: Add settings for precharge, gain and internal resistor | expand |
On Fri, 29 Apr 2022 15:01:41 -0700 Gwendal Grignou <gwendal@chromium.org> wrote: > Allow setting the configure the input analog gain. > > Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Hi Gwendal. So, my immediate thought on this is whether it make sense as a dt controlled thing or not. It's the sort of thing hardwaregain is for in the userspace ABI. However, I see that's already in use for the digital gain. This one also unhelpfully applies to all changes whereas the digital gain is pair wise. Hence there is basically no way we can map the two controls to a single ABI element. So, how would we expect a board designer to set this value? If the answer is we basically have no idea but some boards do want it set then I'm fine with this basically being a somewhat magic value that is in some vague way associated with the antenna setup... Jonathan > --- > New in v5. > > .../bindings/iio/proximity/semtech,sx9324.yaml | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9324.yaml b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9324.yaml > index 0be87ac05b97a..d265eb5258c84 100644 > --- a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9324.yaml > +++ b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9324.yaml > @@ -143,6 +143,17 @@ properties: > description: > Pre-charge input resistance in Ohm. > > + semtech,input-analog-gain: > + $ref: /schemas/types.yaml#/definitions/uint32 > + minimum: 0 > + maximum: 3 > + description: | > + Defines the input antenna analog gain > + 0: x1.247 > + 1: x1 (default) > + 2: x0.768 > + 3: x0.552 > + > required: > - compatible > - reg
On Fri, 29 Apr 2022 15:01:41 -0700, Gwendal Grignou wrote: > Allow setting the configure the input analog gain. > > Signed-off-by: Gwendal Grignou <gwendal@chromium.org> > --- > New in v5. > > .../bindings/iio/proximity/semtech,sx9324.yaml | 11 +++++++++++ > 1 file changed, 11 insertions(+) > Reviewed-by: Rob Herring <robh@kernel.org>
On Fri, 29 Apr 2022 15:01:39 -0700 Gwendal Grignou <gwendal@chromium.org> wrote: > Allow setting the internal resistor used for compensation. > > Signed-off-by: Gwendal Grignou <gwendal@chromium.org> > Reviewed-by: Stephen Boyd <swboyd@chromium.org> > Acked-by: Rob Herring <robh@kernel.org> Applied. > --- > Changes since v4: > - no changes > > Changes since v3: > - Added Review tags. > > Changes since v2: > - no changes > > Changes since v1: > - no changes > > .../bindings/iio/proximity/semtech,sx9324.yaml | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9324.yaml b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9324.yaml > index d689b2bab71b4..0be87ac05b97a 100644 > --- a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9324.yaml > +++ b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9324.yaml > @@ -126,6 +126,15 @@ properties: > UINT_MAX (4294967295) represents infinite. Other values > represent 1-1/N. > > + semtech,int-comp-resistor: > + description: > + Internal resistor setting for compensation. > + enum: > + - lowest > + - low > + - high > + - highest > + > semtech,input-precharge-resistor-ohms: > default: 4000 > multipleOf: 2000 > @@ -165,6 +174,7 @@ examples: > semtech,ph01-proxraw-strength = <2>; > semtech,ph23-proxraw-strength = <2>; > semtech,avg-pos-strength = <64>; > + semtech,int-comp-resistor = "lowest"; > semtech,input-precharge-resistor-ohms = <2000>; > }; > };