diff options
author | Andreas Dannenberg <dannenberg@ti.com> | 2016-01-29 13:03:00 -0600 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-02-01 19:53:12 +0000 |
commit | ea4570d6c29994017e09196d1f8077fb5942b676 (patch) | |
tree | e8dc4f99bd6eaf2a454bbc07c957102d12c2d1ff | |
parent | c2472d0bbcec8920ac9ce4393894bf7844275e81 (diff) | |
download | lwn-ea4570d6c29994017e09196d1f8077fb5942b676.tar.gz lwn-ea4570d6c29994017e09196d1f8077fb5942b676.zip |
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>
-rw-r--r-- | Documentation/devicetree/bindings/iio/light/opt3001.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/iio/light/opt3001.txt b/Documentation/devicetree/bindings/iio/light/opt3001.txt new file mode 100644 index 000000000000..eac30d508849 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/opt3001.txt @@ -0,0 +1,26 @@ +* Texas Instruments OPT3001 Ambient Light Sensor + +The driver supports interrupt-driven and interrupt-less operation, depending +on whether an interrupt property has been populated into the DT. Note that +the optional generation of IIO events on rising/falling light threshold changes +requires the use of interrupts. Without interrupts, only the simple reading +of the current light value is supported through the IIO API. + +http://www.ti.com/product/opt3001 + +Required properties: + - compatible: should be "ti,opt3001" + - reg: the I2C address of the sensor + +Optional properties: + - interrupt-parent: should be the phandle for the interrupt controller + - interrupts: interrupt mapping for GPIO IRQ (configure for falling edge) + +Example: + +opt3001@44 { + compatible = "ti,opt3001"; + reg = <0x44>; + interrupt-parent = <&gpio1>; + interrupts = <28 IRQ_TYPE_EDGE_FALLING>; +}; |