lkml.org 
[lkml]   [2020]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dt-bindings: iio: sx9310: Add various settings as DT properties
On Thu, Sep 03, 2020 at 03:18:28PM -0700, Stephen Boyd wrote:
> We need to set various bits in the hardware registers for this device to
> operate properly depending on how it is installed. Add a handful of DT
> properties to configure these things.
>
> Cc: Daniel Campello <campello@chromium.org>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: <devicetree@vger.kernel.org>
> Cc: Douglas Anderson <dianders@chromium.org>
> Cc: Gwendal Grignou <gwendal@chromium.org>
> Cc: Evan Green <evgreen@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
>
> I haven't written any code to handle these properties yet. I'd rather do
> that once the binding patch is reviewed. Patch based on iio.git testing
> branch.
>
> .../iio/proximity/semtech,sx9310.yaml | 182 ++++++++++++++++++
> 1 file changed, 182 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml
> index 5739074d3592..e74b81483c14 100644
> --- a/Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml
> +++ b/Documentation/devicetree/bindings/iio/proximity/semtech,sx9310.yaml
> @@ -40,6 +40,169 @@ properties:
> "#io-channel-cells":
> const: 1
>
> + semtech,cs0-ground:
> + description: Indicates the CS0 sensor is connected to ground.
> + type: boolean
> +
> + semtech,combined-sensors:
> + allOf:
> + - $ref: /schemas/types.yaml#definitions/uint32
> + - enum: [0, 1, 2, 3]
> + default: 0
> + description:
> + Which sensors are combined. 0 for CS3, 1 for CS0+CS1, 2 for CS1+CS2,
> + and 3 for all sensors.
> +
> + semtech,cs0-gain-factor:
> + allOf:
> + - $ref: /schemas/types.yaml#definitions/uint32
> + - enum: [1, 2, 4, 8]
> + default: 1
> + description:
> + Gain factor for CS0 (and combined if any) sensor.
> +
> + semtech,cs1-gain-factor:
> + allOf:
> + - $ref: /schemas/types.yaml#definitions/uint32
> + - enum: [1, 2, 4, 8]

Now that everyone is trained on 'allOf', you can drop it. json-schema
draft8 changed this behavior.

Rob

\
 
 \ /
  Last update: 2020-09-14 23:01    [W:0.261 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site