Re: [PATCH] dt-bindings: iio: sx9310: Add various settings as DT properties
From: Rob Herring <robh@kernel.org>
Date: 2020-09-14 21:00:58
Also in:
linux-iio, lkml
On Thu, Sep 03, 2020 at 03:18:28PM -0700, Stephen Boyd wrote:
quoted hunk ↗ jump to hunk
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 <redacted> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald-Stadler <redacted> Cc: Rob Herring <robh+dt@kernel.org> Cc: <redacted> Cc: Douglas Anderson <dianders@chromium.org> Cc: Gwendal Grignou <redacted> Cc: Evan Green <redacted> Signed-off-by: Stephen Boyd <redacted> --- 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