iio: light: opt3001: Add device tree binding documentation
Subsystems (2)
PATCH 1/1 iio: light: opt3001: Add device tree binding documentation
--- .../devicetree/bindings/iio/light/opt3001.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/opt3001.txt
Documentation/devicetree/bindings/iio/light/opt3001.txt new file +26 -0
@@ -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>; +};
Signature · 1 line
2.6.4
Quoted 1 line · Andreas Dannenberg
Signed-off-by Andreas Dannenberg <[email protected]>
Looks straight forward enough I'm happy to take this in a few weeks with out a devicetree ack. (though one is as ever welcome!)
In case anyone was wondering, this is retro-documentation - all that has changed recently is the addition of support for running without an interrupt line.
Jonathan
Quoted 38 lines
--- .../devicetree/bindings/iio/light/opt3001.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/opt3001.txtDocumentation/devicetree/bindings/iio/light/opt3001.txt new file +26
-0@@ -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>; +};
Rob Herring
Acked-byQuoted 12 lines · Andreas Dannenberg
Signed-off-by Andreas Dannenberg <[email protected]>--- .../devicetree/bindings/iio/light/opt3001.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/opt3001.txtDocumentation/devicetree/bindings/iio/light/opt3001.txt new file +0
-0
Documentation/devicetree/bindings/iio/light/opt3001.txt line 7
Quoted 7 lines
Documentation/devicetree/bindings/iio/light/opt3001.txt new file +7
-0@@ -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.
Seems like you could poll and do the threshold changes in s/w. Anyway, that's all irrelevant to the DT binding.
Quoted 24 lines · Rob Herring
Quoted 12 lines · Andreas Dannenberg
Signed-off-by Andreas Dannenberg <[email protected]>--- .../devicetree/bindings/iio/light/opt3001.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/opt3001.txtDocumentation/devicetree/bindings/iio/light/opt3001.txt new file +0
-0Documentation/devicetree/bindings/iio/light/opt3001.txt line 7
Quoted 7 lines
Documentation/devicetree/bindings/iio/light/opt3001.txt new file +7
-0@@ -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.Seems like you could poll and do the threshold changes in s/w. Anyway, that's all irrelevant to the DT binding.
Quoted 1 line
Acked-by Rob Herring <[email protected]>
Oddity occurred during a merge or patch application at some point as I actually had some docs in my local tree copy for this, but they weren't being tracked by git.
Checking back, the original patch series did have docs so not sure what rabbit hole these dropped down. Anyhow, easiest option for me is to just apply this patch and not chase down where the original went!
Have added a note to the commit to this effect. Applied to the togreg branch of iio.git.
Thanks,
Jonathan
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Rob Herring
Quoted 6 lines · Andreas Dannenberg
Signed-off-by Andreas Dannenberg <[email protected]>--- .../devicetree/bindings/iio/light/opt3001.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/light/opt3001.txt
Quoted 16 lines
Documentation/devicetree/bindings/iio/light/opt3001.txt line 7
Quoted 13 lines
Documentation/devicetree/bindings/iio/light/opt3001.txt new file +7
-0@@ -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.Seems like you could poll and do the threshold changes in s/w. Anyway, that's all irrelevant to the DT binding.
True that. The recent addition of polling mode to the driver did not consider this use case so until somebody has a strong need for this and adds the needed code at least we have this limitation documented.
Regards,
Andreas
Quoted 2 lines
Acked-by Rob Herring <[email protected]>