From 9cfea767d22ddac685fd8daf20a9531fd607bded Mon Sep 17 00:00:00 2001 From: Nishant Malpani Date: Wed, 18 Mar 2020 12:49:40 +0530 Subject: dt-bindings: iio: tsl2563: convert bindings to YAML Convert the TSL2563 device tree bindings to the new YAML format. Signed-off-by: Nishant Malpani Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron --- .../bindings/iio/light/amstaos,tsl2563.yaml | 49 ++++++++++++++++++++++ .../devicetree/bindings/iio/light/tsl2563.txt | 19 --------- 2 files changed, 49 insertions(+), 19 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/light/amstaos,tsl2563.yaml delete mode 100644 Documentation/devicetree/bindings/iio/light/tsl2563.txt (limited to 'Documentation/devicetree/bindings/iio/light') diff --git a/Documentation/devicetree/bindings/iio/light/amstaos,tsl2563.yaml b/Documentation/devicetree/bindings/iio/light/amstaos,tsl2563.yaml new file mode 100644 index 000000000000..efd2eba5f23c --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/amstaos,tsl2563.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/amstaos,tsl2563.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AMS TAOS TSL2563 ambient light sensor + +maintainers: + - Sebastian Reichel + +description: | + Ambient light sensor with an i2c interface. + +properties: + compatible: + enum: + - amstaos,tsl2560 + - amstaos,tsl2561 + - amstaos,tsl2562 + - amstaos,tsl2563 + + reg: + maxItems: 1 + + amstaos,cover-comp-gain: + description: Multiplier for gain compensation + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [1, 16] + +required: + - compatible + - reg + +examples: + - | + i2c { + + #address-cells = <1>; + #size-cells = <0>; + + light-sensor@29 { + compatible = "amstaos,tsl2563"; + reg = <0x29>; + amstaos,cover-comp-gain = <16>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/light/tsl2563.txt b/Documentation/devicetree/bindings/iio/light/tsl2563.txt deleted file mode 100644 index f91e809e736e..000000000000 --- a/Documentation/devicetree/bindings/iio/light/tsl2563.txt +++ /dev/null @@ -1,19 +0,0 @@ -* AMS TAOS TSL2563 ambient light sensor - -Required properties: - - - compatible : should be "amstaos,tsl2563" - - reg : the I2C address of the sensor - -Optional properties: - - - amstaos,cover-comp-gain : integer used as multiplier for gain - compensation (default = 1) - -Example: - -tsl2563@29 { - compatible = "amstaos,tsl2563"; - reg = <0x29>; - amstaos,cover-comp-gain = <16>; -}; -- cgit v1.2.3 From c194e2389d99be2fc69811693775b81f9ab88f6c Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Sun, 5 Apr 2020 15:50:28 +0200 Subject: dt-bindings: iio: vcnl4000: convert bindings to YAML format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert the vcnl4000 device tree bindings to the new YAML format. Signed-off-by: Guido Günther Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron --- .../devicetree/bindings/iio/light/vcnl4000.txt | 24 ------------ .../bindings/iio/light/vishay,vcnl4000.yaml | 45 ++++++++++++++++++++++ 2 files changed, 45 insertions(+), 24 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/light/vcnl4000.txt create mode 100644 Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml (limited to 'Documentation/devicetree/bindings/iio/light') diff --git a/Documentation/devicetree/bindings/iio/light/vcnl4000.txt b/Documentation/devicetree/bindings/iio/light/vcnl4000.txt deleted file mode 100644 index 955af4555c90..000000000000 --- a/Documentation/devicetree/bindings/iio/light/vcnl4000.txt +++ /dev/null @@ -1,24 +0,0 @@ -VISHAY VCNL4000 - Ambient Light and proximity sensor - -This driver supports the VCNL4000/10/20/40 and VCNL4200 chips - -Required properties: - - -compatible: must be one of : - vishay,vcnl4000 - vishay,vcnl4010 - vishay,vcnl4020 - vishay,vcnl4040 - vishay,vcnl4200 - - -reg: I2C address of the sensor, should be one from below based on the model: - 0x13 - 0x51 - 0x60 - -Example: - -light-sensor@51 { - compatible = "vishay,vcnl4200"; - reg = <0x51>; -}; diff --git a/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml b/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml new file mode 100644 index 000000000000..21ef2eb7a205 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/vishay,vcnl4000.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: VISHAY VCNL4000 ambient light and proximity sensor + +maintainers: + - Peter Meerwald + +description: | + Ambient light sensing with proximity detection over an i2c + interface. + +properties: + compatible: + enum: + - vishay,vcnl4000 + - vishay,vcnl4010 + - vishay,vcnl4020 + - vishay,vcnl4040 + - vishay,vcnl4200 + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: +- | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + light-sensor@51 { + compatible = "vishay,vcnl4200"; + reg = <0x51>; + }; + }; +... -- cgit v1.2.3 From 138986062b50e7e24404e279d2e2c79c0291dac3 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Sun, 5 Apr 2020 15:50:30 +0200 Subject: dt-bindings: iio: light: vcnl4000: Add proximity-near-level MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This value indicates when userspace should consider an object near to the sensor/device. Signed-off-by: Guido Günther Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron --- Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Documentation/devicetree/bindings/iio/light') diff --git a/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml b/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml index 21ef2eb7a205..da8f2e872535 100644 --- a/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml +++ b/Documentation/devicetree/bindings/iio/light/vishay,vcnl4000.yaml @@ -13,6 +13,9 @@ description: | Ambient light sensing with proximity detection over an i2c interface. +allOf: + - $ref: ../common.yaml# + properties: compatible: enum: @@ -21,10 +24,11 @@ properties: - vishay,vcnl4020 - vishay,vcnl4040 - vishay,vcnl4200 - reg: maxItems: 1 + proximity-near-level: true + required: - compatible - reg @@ -40,6 +44,7 @@ examples: light-sensor@51 { compatible = "vishay,vcnl4200"; reg = <0x51>; + proximity-near-level = <220>; }; }; ... -- cgit v1.2.3