[PATCH 1/2] dt-bindings: iio: chemical: Document senseair,sunrise CO2 sensor

Subsystems: iio subsystem and drivers, open firmware and flattened device tree bindings, senseair sunrise 006-0-0007, the rest

STALE1894d SUPERSEDED

Revision v1 of 5 in this series.

Revisions (5)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]

5 messages, 3 authors, 2021-08-18 · open the first message on its own page

[PATCH 1/2] dt-bindings: iio: chemical: Document senseair,sunrise CO2 sensor

From: Jacopo Mondi <jacopo@jmondi.org>
Date: 2021-08-17 15:52:37

Add documentation for the Senseair Sunrise 006-0-0007 CO2 NDIR sensor.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 .../iio/chemical/senseair,sunrise.yaml        | 51 +++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |  2 +
 2 files changed, 53 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/chemical/senseair,sunrise.yaml
diff --git a/Documentation/devicetree/bindings/iio/chemical/senseair,sunrise.yaml b/Documentation/devicetree/bindings/iio/chemical/senseair,sunrise.yaml
new file mode 100644
index 000000000000..b77196666187
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/chemical/senseair,sunrise.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/chemical/senseair,sunrise.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Senseair Sunrise 006-0-0007 CO2 Sensor
+
+maintainers:
+  - Jacopo Mondi <jacopo@jmondi.org>
+
+description: |
+  Senseair Sunrise 006-0-0007 is a NDIR CO2 sensor. It supports I2C or UART buses
+  for communications and control.
+
+  Datasheets:
+    https://rmtplusstoragesenseair.blob.core.windows.net/docs/Dev/publicerat/PSP11704.pdf
+    https://rmtplusstoragesenseair.blob.core.windows.net/docs/Dev/publicerat/PSH11649.pdf
+    https://rmtplusstoragesenseair.blob.core.windows.net/docs/Dev/publicerat/TDE5531.pdf
+    https://rmtplusstoragesenseair.blob.core.windows.net/docs/Market/publicerat/TDE7318.pdf
+
+properties:
+  compatible:
+    const: senseair,sunrise-006-0-0007
+
+  reg:
+    maxItems: 1
+
+  ndry-gpios:
+    description: Phandle to the GPIO line connected to the nDRY pin. Active low.
+
+  en-gpios:
+    description: Phandle to the GPIO line connected to the EN pin. Active high.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      sunrise@68 {
+        compatible = "senseair,sunrise-006-0-0007";
+        reg = <0x68>;
+      };
+    };
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 944a14926e02..c60502eb3d36 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -1000,6 +1000,8 @@ patternProperties:
     description: Shenzhen SEI Robotics Co., Ltd
   "^semtech,.*":
     description: Semtech Corporation
+  "^senseair,.*":
+    description: Senseair AB
   "^sensirion,.*":
     description: Sensirion AG
   "^sensortek,.*":
--
2.32.0

Re: [PATCH 1/2] dt-bindings: iio: chemical: Document senseair,sunrise CO2 sensor

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2021-08-17 16:50:58

On Tue, Aug 17, 2021 at 05:49:50PM +0200, Jacopo Mondi wrote:
Add documentation for the Senseair Sunrise 006-0-0007 CO2 NDIR sensor.
quoted hunk
+  ndry-gpios:
+    description: Phandle to the GPIO line connected to the nDRY pin. Active low.
+
+  en-gpios:
+    description: Phandle to the GPIO line connected to the EN pin. Active high.
Not sure you have to mention polarity. It can be changed on PCB level easily
and this bindings won't satisfy those (valid) changes.

-- 
With Best Regards,
Andy Shevchenko

Re: [PATCH 1/2] dt-bindings: iio: chemical: Document senseair,sunrise CO2 sensor

From: Jacopo Mondi <jacopo@jmondi.org>
Date: 2021-08-18 07:29:04

Hi Andy,

On Tue, Aug 17, 2021 at 07:50:46PM +0300, Andy Shevchenko wrote:
On Tue, Aug 17, 2021 at 05:49:50PM +0200, Jacopo Mondi wrote:
quoted
Add documentation for the Senseair Sunrise 006-0-0007 CO2 NDIR sensor.
quoted
+  ndry-gpios:
+    description: Phandle to the GPIO line connected to the nDRY pin. Active low.
+
+  en-gpios:
+    description: Phandle to the GPIO line connected to the EN pin. Active high.
Not sure you have to mention polarity. It can be changed on PCB level easily
and this bindings won't satisfy those (valid) changes.
Well, one can indeed invert the signal on the PCB, it's weird I see most of
the bindings reporting the pin's active polarity though...

I'll drop it.

Thanks
   j
--
With Best Regards,
Andy Shevchenko

Re: [PATCH 1/2] dt-bindings: iio: chemical: Document senseair,sunrise CO2 sensor

From: Rob Herring <robh@kernel.org>
Date: 2021-08-18 16:47:23

On Wed, Aug 18, 2021 at 09:29:43AM +0200, Jacopo Mondi wrote:
Hi Andy,

On Tue, Aug 17, 2021 at 07:50:46PM +0300, Andy Shevchenko wrote:
quoted
On Tue, Aug 17, 2021 at 05:49:50PM +0200, Jacopo Mondi wrote:
quoted
Add documentation for the Senseair Sunrise 006-0-0007 CO2 NDIR sensor.
quoted
+  ndry-gpios:
+    description: Phandle to the GPIO line connected to the nDRY pin. Active low.
+
+  en-gpios:
+    description: Phandle to the GPIO line connected to the EN pin. Active high.
Not sure you have to mention polarity. It can be changed on PCB level easily
and this bindings won't satisfy those (valid) changes.
Well, one can indeed invert the signal on the PCB, it's weird I see most of
the bindings reporting the pin's active polarity though...

I'll drop it.
I'd keep it. It's documenting the pin on the h/w. You can prefix with 
'Typically' if you want.

Rob

Re: [PATCH 1/2] dt-bindings: iio: chemical: Document senseair,sunrise CO2 sensor

From: Rob Herring <robh@kernel.org>
Date: 2021-08-18 16:49:39

On Tue, Aug 17, 2021 at 05:49:50PM +0200, Jacopo Mondi wrote:
quoted hunk
Add documentation for the Senseair Sunrise 006-0-0007 CO2 NDIR sensor.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 .../iio/chemical/senseair,sunrise.yaml        | 51 +++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |  2 +
 2 files changed, 53 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/chemical/senseair,sunrise.yaml
diff --git a/Documentation/devicetree/bindings/iio/chemical/senseair,sunrise.yaml b/Documentation/devicetree/bindings/iio/chemical/senseair,sunrise.yaml
new file mode 100644
index 000000000000..b77196666187
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/chemical/senseair,sunrise.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/chemical/senseair,sunrise.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Senseair Sunrise 006-0-0007 CO2 Sensor
+
+maintainers:
+  - Jacopo Mondi <jacopo@jmondi.org>
+
+description: |
+  Senseair Sunrise 006-0-0007 is a NDIR CO2 sensor. It supports I2C or UART buses
+  for communications and control.
+
+  Datasheets:
+    https://rmtplusstoragesenseair.blob.core.windows.net/docs/Dev/publicerat/PSP11704.pdf
+    https://rmtplusstoragesenseair.blob.core.windows.net/docs/Dev/publicerat/PSH11649.pdf
+    https://rmtplusstoragesenseair.blob.core.windows.net/docs/Dev/publicerat/TDE5531.pdf
+    https://rmtplusstoragesenseair.blob.core.windows.net/docs/Market/publicerat/TDE7318.pdf
+
+properties:
+  compatible:
+    const: senseair,sunrise-006-0-0007
+

8 more quoted lines

You need to define how many (maxItems: 1).
quoted hunk
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      sunrise@68 {
'co2-sensor' perhaps.
quoted hunk
+        compatible = "senseair,sunrise-006-0-0007";
+        reg = <0x68>;
+      };
+    };
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 944a14926e02..c60502eb3d36 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -1000,6 +1000,8 @@ patternProperties:
     description: Shenzhen SEI Robotics Co., Ltd
   "^semtech,.*":
     description: Semtech Corporation
+  "^senseair,.*":
+    description: Senseair AB
   "^sensirion,.*":
     description: Sensirion AG
   "^sensortek,.*":
--
2.32.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help