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: Alexander Koch <mail@alexanderkoch.net>
Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Tested-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>