]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf9d9311f9eff87258864e3650e5128dd225f59f6
tree756031214125e0400b29923e179e9011c3ef0090
parent1730335398ff514b03685220d7c316cbd826e38e
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