Re: [PATCH 3/3] dt-bindings: <hwmon>: add sht3x devicetree binding

From: Guenter Roeck
Date: Sat Jun 24 2023 - 12:36:56 EST


On 6/24/23 09:01, JuenKit_Yip@xxxxxxxxxxx wrote:
From: JuenKit Yip <JuenKit_Yip@xxxxxxxxxxx>

add sht3x devicetree binding files

Signed-off-by: JuenKit Yip <JuenKit_Yip@xxxxxxxxxxx>
---
.../devicetree/bindings/hwmon/sht3x.yaml | 31 +++++++++++++++++++

This isn't needed if the compatibles are added to trivial-devices.yaml
(and it really only makes sense if there are additional properties
besides compatible).

Guenter

.../devicetree/bindings/trivial-devices.yaml | 4 +++
2 files changed, 35 insertions(+)
create mode 100644 Documentation/devicetree/bindings/hwmon/sht3x.yaml

diff --git a/Documentation/devicetree/bindings/hwmon/sht3x.yaml b/Documentation/devicetree/bindings/hwmon/sht3x.yaml
new file mode 100644
index 000000000000..8ff0b8d41f91
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/sht3x.yaml
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+% YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/sensirion,sht3x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sensirion SHT3x-DIS humidity and temperature sensor
+
+maintainers:
+ - JuenKit Yip <JuenKit_Yip@xxxxxxxxxxx>
+
+properties:
+ compatible:
+ enum:
+ - sensirion,sht3x
+ - sensirion,sts3x
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+addtionalProperties: false
+
+examples:
+ - |
+ sensor@4a {
+ compatible = "sensirion,sht3x";
+ reg = <0x4a>;
+ };
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index ba2bfb547909..b2369d1fad68 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -331,6 +331,10 @@ properties:
- sensirion,sgp30
# Sensirion gas sensor with I2C interface
- sensirion,sgp40
+ # Sensirion SHT3x-DIS humidity and temperature sensor
+ - sensirion,sht3x
+ # Sensirion STS3x humidity sensor
+ - sensirion,sts3x
# Sensirion temperature & humidity sensor with I2C interface
- sensirion,sht4x
# Sensortek 3 axis accelerometer