Skip to content

Commit

Permalink
iio: mxs: Implement support for touchscreen
Browse files Browse the repository at this point in the history
This patch implements support for sampling of a touchscreen into
the MXS LRADC driver. The LRADC block allows configuring some of
it's channels into special mode where they either output the drive
voltage or sample it, allowing it to operate a 4-wire or 5-wire
resistive touchscreen.

In case the touchscreen mode is enabled, the LRADC slot #7 is
reserved for touchscreen only, therefore it is not possible to
sample 8 LRADC channels at time, but only 7 channels.

The touchscreen controller is configured such that the PENDOWN event
disables touchscreen interrupts and triggers execution of worker
thread, which then polls the touchscreen controller for X, Y and
Pressure values. This reduces the overhead of interrupt-driven
operation. Upon the PENUP event, the worker thread re-enables the
PENDOWN detection interrupt and exits.

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Marek Vasut authored and jic23 committed Jan 26, 2013
1 parent 2b4ff03 commit 06ddd35
Show file tree
Hide file tree
Showing 2 changed files with 451 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ Required properties:
- reg: Address and length of the register set for the device
- interrupts: Should contain the LRADC interrupts

Optional properties:
- fsl,lradc-touchscreen-wires: Number of wires used to connect the touchscreen
to LRADC. Valid value is either 4 or 5. If this
property is not present, then the touchscreen is
disabled.

Examples:

lradc@80050000 {
Expand Down
Loading

0 comments on commit 06ddd35

Please sign in to comment.