iio: mxs-lradc: make ADC reads not disable touchscreen interrupts
authorKristina Martšenko <kristina.martsenko@gmail.com>
Sun, 25 Jan 2015 16:28:20 +0000 (18:28 +0200)
committerJonathan Cameron <jic23@kernel.org>
Mon, 26 Jan 2015 20:58:22 +0000 (20:58 +0000)
commit86bf7f3ef7e961e91e16dceb31ae0f583483b204
treebc424bae3062607117eeb39e22673e966245b0b6
parentf81197b8a31b8fb287ae57f597b5b6841e1ece92
iio: mxs-lradc: make ADC reads not disable touchscreen interrupts

Reading a channel through sysfs, or starting a buffered capture, will
currently turn off the touchscreen. This is because the read_raw() and
buffer preenable()/postdisable() callbacks disable interrupts for all
LRADC channels, including those the touchscreen uses.

So make the callbacks only disable interrupts for the channels they use.
This means channel 0 for read_raw() and channels 0-5 for the buffer (if
the touchscreen is enabled). Since the touchscreen uses different
channels (6 and 7), it no longer gets turned off.

Note that only i.MX28 is affected by this issue, i.MX23 should be fine.

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Cc: Stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/mxs-lradc.c