Skip to contentSkip to conversation

dt-bindings: iio: Add dedicated CM32181 schema

PATCH In review Rob Herring (Arm) 3 participants 3 messages Sep 23 – Sep 27

Subsystems (2)
lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

PATCH v2 1/1 dt-bindings: iio: Add dedicated CM32181 schema

Add a dedicated Capella CM32181 ambient light sensor schema. The device has optional vdd-supply and interrupt properties, so it no longer fits in trivial-devices. Include both optional properties in the binding example.

Assisted-by LLM

---
v2:
- use additionalProperties instead of unevaluatedProperties

---
 .../bindings/iio/light/capella,cm32181.yaml   | 44 +++++++++++++++++++
 .../devicetree/bindings/trivial-devices.yaml  |  2 -
 2 files changed, 44 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/iio/light/capella,cm32181.yaml
Documentation/devicetree/bindings/iio/light/capella,cm32181.yaml new file +44 -0
new file mode 100644
index 000000000000..e64085a9cb2b
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/capella,cm32181.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Capella CM32181 ambient light sensor
+
+maintainers:
+  - Kevin Tsai <[email protected]>
+
+properties:
+  compatible:
+    const: capella,cm32181
+
+  reg:
+    maxItems: 1
+
+  vdd-supply: true
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        light-sensor@10 {
+            compatible = "capella,cm32181";
+            reg = <0x10>;
+            vdd-supply = <&vdd_3v3>;
+            interrupt-parent = <&gpio>;
+            interrupts = <17 IRQ_TYPE_EDGE_RISING>;
+        };
+    };
Documentation/devicetree/bindings/trivial-devices.yaml +0 -2
index b7ddbeb40a27..1778bf9fe17d 100644
@@ -81,8 +81,6 @@ properties:
           - atmel,atsha204a
             # BPA-RS600: Power Supply
           - blutek,bpa-rs600
-            # CM32181: Ambient Light Sensor
-          - capella,cm32181
             # CM3232: Ambient Light Sensor
           - capella,cm3232
             # CM3323: Ambient Light Sensor
Signature · 1 line
2.53.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 11 lines · On Wed, 23 Sep 2026 14:16:15 -0500 "Rob Herring (Arm)" <[email protected]> wrote:

Add a dedicated Capella CM32181 ambient light sensor schema. The device has optional vdd-supply and interrupt properties, so it no longer fits in trivial-devices. Include both optional properties in the binding example.

Assisted-by LLM

---
v2:
- use additionalProperties instead of unevaluatedProperties
---

Signature · 2 lines
Kind regards,
Joshua Crofts
maintainer
#2 lore raw
Quoted 8 lines · On Thu, 24 Sep 2026 09:06:17 +0200 Joshua Crofts <[email protected]>…
Quoted 5 lines · On Wed, 23 Sep 2026 14:16:15 -0500 "Rob Herring (Arm)" <[email protected]> wrote:

Add a dedicated Capella CM32181 ambient light sensor schema. The device has optional vdd-supply and interrupt properties, so it no longer fits in trivial-devices. Include both optional properties in the binding example.

Quoted 9 lines
Quoted 6 lines
Assisted-by LLM

---
v2:
- use additionalProperties instead of unevaluatedProperties
---

Applied to the testing branch of iio.git.

Thanks,

Jonathan