[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f6476e06cd8d1cf3aff6563530612c536cd45716.1723527641.git.jan.kiszka@siemens.com>
Date: Tue, 13 Aug 2024 07:40:41 +0200
From: Jan Kiszka <jan.kiszka@...mens.com>
To: Jonathan Cameron <jic23@...nel.org>,
linux-iio@...r.kernel.org,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Bao Cheng Su <baocheng.su@...mens.com>,
Chao Zeng <chao.zeng@...mens.com>,
devicetree@...r.kernel.org
Subject: [PATCH 2/3] dt-bindings: iio: Add everlight pm16d17 binding
From: Chao Zeng <chao.zeng@...mens.com>
Add the binding document for the everlight pm16d17 sensor.
Signed-off-by: Chao Zeng <chao.zeng@...mens.com>
Co-developed-by: Baocheng Su <baocheng.su@...mens.com>
Signed-off-by: Baocheng Su <baocheng.su@...mens.com>
---
.../iio/proximity/everlight,pm16d17.yaml | 95 +++++++++++++++++++
1 file changed, 95 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/proximity/everlight,pm16d17.yaml
diff --git a/Documentation/devicetree/bindings/iio/proximity/everlight,pm16d17.yaml b/Documentation/devicetree/bindings/iio/proximity/everlight,pm16d17.yaml
new file mode 100644
index 000000000000..fadc3075181a
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/proximity/everlight,pm16d17.yaml
@@ -0,0 +1,95 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/proximity/everlight,pm16d17.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Everlight PM-16D17 Ambient Light & Proximity Sensor
+
+maintainers:
+ - Chao Zeng <chao.zeng@...mens.com>
+
+description: |
+ This sensor uses standard I2C interface. Interrupt function is not covered.
+ Datasheet: https://en.everlight.com/sensor/category-proximity_sensor/digital_proximity_sensor/
+
+properties:
+ compatible:
+ enum:
+ - everlight,pm16d17
+
+ reg:
+ maxItems: 1
+
+ ps-gain:
+ description: Receiver gain of proximity sensor
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [1, 2, 4, 8]
+ default: 1
+
+ ps-itime:
+ description: Conversion time for proximity sensor [ms]
+ $ref: /schemas/types.yaml#/definitions/string
+ enum:
+ - "0.4"
+ - "0.8"
+ - "1.6"
+ - "3.2"
+ - "6.3"
+ - "12.6"
+ - "25.2"
+ default: "0.4"
+
+ ps-wtime:
+ description: Waiting time for proximity sensor [ms]
+ $ref: /schemas/types.yaml#/definitions/string
+ enum:
+ - "12.5"
+ - "25"
+ - "50"
+ - "100"
+ - "200"
+ - "400"
+ - "800"
+ - "1600"
+ default: "12.5"
+
+ ps-ir-led-pulse-count:
+ description: IR LED drive pulse count
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 1
+ maximum: 256
+ default: 1
+
+ ps-offset-cancel:
+ description: |
+ When PS offset cancel function is enabled, the result of subtracting any
+ value specified by the PS offset cancel register from the internal PS
+ output data is written to the PS output data register.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0
+ maximum: 65535
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ lightsensor: pm16d17@44 {
+ compatible = "everlight,pm16d17";
+ reg = <0x44>;
+
+ ps-gain = <1>;
+ ps-itime = "0.4";
+ ps-wtime = "12.5";
+ ps-ir-led-pulse-count = <1>;
+ ps-offset-cancel = <280>;
+ };
+ };
--
2.43.0
Powered by blists - more mailing lists