Skip to content

Commit

Permalink
iio: light: opt3001: Add device tree binding documentation
Browse files Browse the repository at this point in the history
The original documentation as submitted with the driver appears to have
dropped down a rabbit hole.

Signed-off-by: Andreas Dannenberg <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
Andreas Dannenberg authored and jic23 committed Feb 1, 2016
1 parent c2472d0 commit ea4570d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Documentation/devicetree/bindings/iio/light/opt3001.txt
Original file line number Diff line number Diff line change
@@ -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>;
};

0 comments on commit ea4570d

Please sign in to comment.