Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: light: opt3001: Add device tree binding documentation

The original documentation as submitted with the driver appears to have
dropped down a rabbit hole.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

authored by

Andreas Dannenberg and committed by
Jonathan Cameron
ea4570d6 c2472d0b

+26
+26
Documentation/devicetree/bindings/iio/light/opt3001.txt
··· 1 + * Texas Instruments OPT3001 Ambient Light Sensor 2 + 3 + The driver supports interrupt-driven and interrupt-less operation, depending 4 + on whether an interrupt property has been populated into the DT. Note that 5 + the optional generation of IIO events on rising/falling light threshold changes 6 + requires the use of interrupts. Without interrupts, only the simple reading 7 + of the current light value is supported through the IIO API. 8 + 9 + http://www.ti.com/product/opt3001 10 + 11 + Required properties: 12 + - compatible: should be "ti,opt3001" 13 + - reg: the I2C address of the sensor 14 + 15 + Optional properties: 16 + - interrupt-parent: should be the phandle for the interrupt controller 17 + - interrupts: interrupt mapping for GPIO IRQ (configure for falling edge) 18 + 19 + Example: 20 + 21 + opt3001@44 { 22 + compatible = "ti,opt3001"; 23 + reg = <0x44>; 24 + interrupt-parent = <&gpio1>; 25 + interrupts = <28 IRQ_TYPE_EDGE_FALLING>; 26 + };