]> git.karo-electronics.de Git - linux-beck.git/commit
iio: mxs-lradc: separate touchscreen and buffer virtual channels
authorKristina Martšenko <kristina.martsenko@gmail.com>
Sun, 25 Jan 2015 16:28:19 +0000 (18:28 +0200)
committerJonathan Cameron <jic23@kernel.org>
Mon, 26 Jan 2015 20:57:37 +0000 (20:57 +0000)
commitf81197b8a31b8fb287ae57f597b5b6841e1ece92
tree1f429f871d970e4d9f5cab5ffdc3521c87ac22b3
parent4f33fbae555000bf73aaacbc4f5b24668afc8c7a
iio: mxs-lradc: separate touchscreen and buffer virtual channels

The touchscreen was initially designed [1] to map all of its physical
channels to one virtual channel, leaving buffered capture to use the
remaining 7 virtual channels. When the touchscreen was reimplemented
[2], it was made to use four virtual channels, which overlap and
conflict with the channels the buffer uses.

As a result, when the buffer is enabled, the touchscreen's virtual
channels are remapped to whichever physical channels the buffer was
configured with, causing the touchscreen to read those instead of the
touch measurement channels. Effectively the touchscreen stops working.

So here we separate the channels again, giving the touchscreen 2 virtual
channels and the buffer 6. We can't give the touchscreen just 1 channel
as before, as the current pressure calculation requires 2 channels to be
read at the same time.

This makes the touchscreen continue to work during buffered capture. It
has been tested on i.MX28, but not on i.MX23.

[1] 06ddd353f5c8 ("iio: mxs: Implement support for touchscreen")
[2] dee05308f602 ("Staging/iio/adc/touchscreen/MXS: add interrupt driven
touch detection")

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