linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] iio: light: opt3001: Enable operation w/o IRQ
@ 2016-01-12 18:09 Alexander Koch
  2016-01-12 18:09 ` [PATCH 1/2] iio: light: opt3001: extract int. time constants Alexander Koch
  2016-01-12 18:09 ` [PATCH 2/2] iio: light: opt3001: enable operation w/o IRQ Alexander Koch
  0 siblings, 2 replies; 8+ messages in thread
From: Alexander Koch @ 2016-01-12 18:09 UTC (permalink / raw)
  To: jic23
  Cc: knaack.h, lars, pmeerw, mhornung.linux, dannenberg, balbi,
	linux-iio, linux-kernel, Alexander Koch

This patch series aims at enabling IRQ-less operation for the TI OPT3001 light
sensor.

The current version of the driver requires an interrupt line to be connected to
the INT pin of the sensor, through which the IIO framework gets notified about
readout values being ready. In the datasheet this is described as optional (sec.
8.1.1).

In my use case of the OPT3001 I do not have any interrupt lines or GPIOs
available to connect the INT pin to, so I have implemented an interrupt-less
operation mode that simply sleeps for the specified worst-case readout time
instead of waiting for the interrupt.

This change is transparent as interrupt-less operation mode is done only when no
valid interrupt no. is configured via device tree.

Patches are taken against linux-next/master, tested by compilation,
checkpatch.pl and by running on an embedded developer board (both IRQ-enabled
and IRQ-less mode).


Alexander Koch (2):
  iio: light: opt3001: extract int. time constants
  iio: light: opt3001: enable operation w/o IRQ

 drivers/iio/light/opt3001.c | 152 ++++++++++++++++++++++++++++++--------------
 1 file changed, 104 insertions(+), 48 deletions(-)

-- 
2.7.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-01-16 13:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-12 18:09 [PATCH 0/2] iio: light: opt3001: Enable operation w/o IRQ Alexander Koch
2016-01-12 18:09 ` [PATCH 1/2] iio: light: opt3001: extract int. time constants Alexander Koch
2016-01-12 18:09 ` [PATCH 2/2] iio: light: opt3001: enable operation w/o IRQ Alexander Koch
2016-01-12 19:27   ` Peter Meerwald-Stadler
2016-01-12 20:17     ` Alexander Koch
2016-01-16 12:52       ` Jonathan Cameron
2016-01-16 12:53         ` Jonathan Cameron
2016-01-16 13:16           ` Alexander Koch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).