Skip to content
Commit ac663db3 authored by Alexander Koch's avatar Alexander Koch Committed by Jonathan Cameron
Browse files

iio: light: opt3001: enable operation w/o IRQ



Enable operation of the TI OPT3001 light sensor without having an
interrupt line available to connect the INT pin to.

In this operation mode, we issue a conversion request and simply wait
for the conversion time available as timeout value, determined from
integration time configuration and the worst-case time given in the data
sheet (sect. 6.5, table on p. 5):

  short integration time (100ms): 110ms + 3ms = 113ms
   long integration time (800ms): 880ms + 3ms = 883ms

This change is transparent as behaviour defaults to using the interrupt
method if an interrupt no. is configured via device tree. Interrupt-less
operation mode is performed when no valid interrupt no. is given.

Signed-off-by: default avatarAlexander Koch <mail@alexanderkoch.net>
Signed-off-by: default avatarMichael Hornung <mhornung.linux@gmail.com>
Tested-by: default avatarAndreas Dannenberg <dannenberg@ti.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 84e8d090
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment