Commit e94b3c60 authored by Stephen Boyd's avatar Stephen Boyd Committed by Jonathan Cameron

dt-bindings: iio: sx9310: Add various settings as DT properties

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.
Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Cc: Daniel Campello <campello@chromium.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: <devicetree@vger.kernel.org>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Gwendal Grignou <gwendal@chromium.org>
Cc: Evan Green <evgreen@chromium.org>
Link: https://lore.kernel.org/r/20201007011735.1346994-6-swboyd@chromium.orgSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 1b687201
...@@ -40,6 +40,63 @@ properties: ...@@ -40,6 +40,63 @@ properties:
"#io-channel-cells": "#io-channel-cells":
const: 1 const: 1
semtech,cs0-ground:
description: Indicates the CS0 sensor is connected to ground.
type: boolean
semtech,combined-sensors:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: |
List of which sensors are combined and represented by CS3.
Possible values are -
3 - CS3 (internal)
0 1 - CS0 + CS1
1 2 - CS1 + CS2 (default)
0 1 2 3 - CS0 + CS1 + CS2 + CS3
items:
enum: [ 0, 1, 2, 3 ]
minItems: 1
maxItems: 4
semtech,resolution:
description:
Capacitance measure resolution. Refer to datasheet for more details.
enum:
- coarsest
- very-coarse
- coarse
- medium-coarse
- medium
- fine
- very-fine
- finest
semtech,startup-sensor:
$ref: /schemas/types.yaml#definitions/uint32
enum: [0, 1, 2, 3]
default: 0
description:
Sensor used for start-up proximity detection. The combined
sensor is represented by the value 3. This is used for initial
compensation.
semtech,proxraw-strength:
$ref: /schemas/types.yaml#definitions/uint32
enum: [0, 2, 4, 8]
default: 2
description:
PROXRAW filter strength. A value of 0 represents off, and other values
represent 1-1/N.
semtech,avg-pos-strength:
$ref: /schemas/types.yaml#definitions/uint32
enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
default: 16
description:
Average positive filter strength. A value of 0 represents off and
UINT_MAX (4294967295) represents infinite. Other values
represent 1-1/N.
required: required:
- compatible - compatible
- reg - reg
...@@ -61,5 +118,11 @@ examples: ...@@ -61,5 +118,11 @@ examples:
vdd-supply = <&pp3300_a>; vdd-supply = <&pp3300_a>;
svdd-supply = <&pp1800_prox>; svdd-supply = <&pp1800_prox>;
#io-channel-cells = <1>; #io-channel-cells = <1>;
semtech,cs0-ground;
semtech,combined-sensors = <1 2 3>;
semtech,resolution = "fine";
semtech,startup-sensor = <1>;
semtech,proxraw-strength = <2>;
semtech,avg-pos-strength = <64>;
}; };
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment