staging: iio: adc: ad7606: Add support for threaded irq
authorStefan Popa <stefan.popa@analog.com>
Mon, 17 Dec 2018 12:23:37 +0000 (14:23 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 5 Jan 2019 16:10:52 +0000 (16:10 +0000)
commitcc49bd1652a405dc641aeffa6b0925ad9a1affb3
tree756031214125e0400b29923e179e9011c3ef0090
parentca5b4637d7ca561dbaba13d725957610a783ac2c
staging: iio: adc: ad7606: Add support for threaded irq

This patch replaces the use of a polling ring buffer with a threaded
interrupt.

Enabling the buffer sets the CONVST signal to high. When the rising edge
of the CONVST is applied, BUSY signal goes logic high and transitions low
at the end of the entire conversion process. The falling edge of the BUSY
signal triggers the interrupt.

ad7606_trigger_handler() is used as bottom half of the poll function.
It reads data from the device and stores it in the internal buffer.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/adc/ad7606.c
drivers/staging/iio/adc/ad7606.h