iio: ti_am335x_adc: Add continuous sampling support
authorZubair Lutfullah <zubair.lutfullah@gmail.com>
Thu, 19 Sep 2013 06:24:00 +0000 (07:24 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 21 Sep 2013 18:23:47 +0000 (19:23 +0100)
commitca9a563805f7ae821e3303b1bdbc65d3a3c783ff
tree7453f8ace4421b3d23b53c5bf8c222e0a5ffbbaf
parent0f6fc7d56fe56aad5410fdaa7cebbb918580a33c
iio: ti_am335x_adc: Add continuous sampling support

Previously the driver had only one-shot reading functionality.
This patch adds continuous sampling support to the driver.

Continuous sampling starts when buffer is enabled.
HW IRQ wakes worker thread that pushes samples to userspace.
Sampling stops when buffer is disabled by userspace.

Patil Rachna (TI) laid the ground work for ADC HW register access.
Russ Dill (TI) fixed bugs in the driver relevant to FIFOs and IRQs.

I fixed channel scanning so multiple ADC channels can be read
simultaneously and pushed to userspace.
Restructured the driver to fit IIO ABI.
And added INDIO_BUFFER_HARDWARE mode.

Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/Kconfig
drivers/iio/adc/ti_am335x_adc.c
include/linux/mfd/ti_am335x_tscadc.h