[PATCH 1/2] dt-bindings: iio: Add AMS TCS3430 color sensor bindings
From: Paul Kocialkowski
Date: Sat Nov 30 2024 - 12:43:26 EST
The AMS TCS3430 is a XYZ tristimulus color sensor.
It requires a VDD power supply and can optionally support an interrupt.
Signed-off-by: Paul Kocialkowski <paulk@xxxxxxxxxxx>
---
.../bindings/iio/light/ams,tcs3430.yaml | 51 +++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/light/ams,tcs3430.yaml
diff --git a/Documentation/devicetree/bindings/iio/light/ams,tcs3430.yaml b/Documentation/devicetree/bindings/iio/light/ams,tcs3430.yaml
new file mode 100644
index 000000000000..7ecdd86932e8
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/ams,tcs3430.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/ams,tcs3430.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: AMS TCS3430 XYZ tristimulus color sensor
+
+maintainers:
+ - Paul Kocialkowski <paulk@xxxxxxxxxxx>
+
+description: |
+ The device supports both interrupt-driven and interrupt-less operation,
+ depending on whether an interrupt property is present in the device-tree.
+
+properties:
+ compatible:
+ const: ams,tcs3430
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+ description: The interrupt is detected on a low level.
+
+ vdd-supply: true
+
+additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - vdd-supply
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ light-sensor@39 {
+ compatible = "ams,tcs3430";
+ reg = <0x39>;
+ interrupt-parent = <&pio>;
+ interrupts = <0 8 IRQ_TYPE_EDGE_FALLING>;
+ vdd-supply = <®_vcc_io>;
+ };
+ };
+...
--
2.47.0