devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: iio: Add TI OPT4048 color sensor bindings
@ 2024-11-30 17:42 Paul Kocialkowski
  2024-11-30 17:42 ` [PATCH 2/2] iio: light: Add support for the TI OPT4048 color sensor Paul Kocialkowski
  2024-12-02  8:41 ` [PATCH 1/2] dt-bindings: iio: Add TI OPT4048 color sensor bindings Krzysztof Kozlowski
  0 siblings, 2 replies; 10+ messages in thread
From: Paul Kocialkowski @ 2024-11-30 17:42 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-kernel
  Cc: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Paul Kocialkowski

The Texas Instruments OPT4048 is a XYZ tristimulus color sensor.

It requires a VDD power supply and can optionally support an interrupt.

Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
---
 .../bindings/iio/light/ti,opt4048.yaml        | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/light/ti,opt4048.yaml

diff --git a/Documentation/devicetree/bindings/iio/light/ti,opt4048.yaml b/Documentation/devicetree/bindings/iio/light/ti,opt4048.yaml
new file mode 100644
index 000000000000..e2b7472ab588
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/ti,opt4048.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/ti,opt4048.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments OPT4048 XYZ tristimulus color sensor
+
+maintainers:
+  - Paul Kocialkowski <paulk@sys-base.io>
+
+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: ti,opt4048
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+    description: |
+      The interrupt is detected on a falling edge, with a low level asserted
+      for 1 us. It might be missed because of hardware interrupt debouncing
+      mechanisms due to this short time.
+
+  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@44 {
+          compatible = "ti,opt4048";
+            reg = <0x44>;
+            interrupt-parent = <&pio>;
+            interrupts = <0 8 IRQ_TYPE_EDGE_FALLING>;
+            vdd-supply = <&reg_vcc_io>;
+        };
+    };
+...
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-12-04 14:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-30 17:42 [PATCH 1/2] dt-bindings: iio: Add TI OPT4048 color sensor bindings Paul Kocialkowski
2024-11-30 17:42 ` [PATCH 2/2] iio: light: Add support for the TI OPT4048 color sensor Paul Kocialkowski
2024-12-01  1:29   ` kernel test robot
2024-12-01 11:55   ` Jonathan Cameron
2024-12-01 17:56     ` Paul Kocialkowski
2024-12-02 11:06       ` Jonathan Cameron
2024-12-02 14:55         ` Mehdi Djait
2024-12-04 14:49           ` Paul Kocialkowski
2024-12-04 14:48         ` Paul Kocialkowski
2024-12-02  8:41 ` [PATCH 1/2] dt-bindings: iio: Add TI OPT4048 color sensor bindings Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).