]> git.baikalelectronics.ru Git - kernel.git/commit
Input: ads7846 - switch to using threaded IRQ
authorJason Wang <jason77.wang@gmail.com>
Wed, 13 Oct 2010 18:35:40 +0000 (11:35 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 18 Oct 2010 04:10:28 +0000 (21:10 -0700)
commit553a76d6b646b2d39c5078f46107cb8bc1136f85
treeccf612f19613723148f9c40965af15a7f7c79af4
parentcb5840960b9be81946a707040bd7e0459f0220a9
Input: ads7846 - switch to using threaded IRQ

Commit cfef9f2 introduces regulator operations in ads7846 touchscreen
driver. Among these operations, some are called while holding a
spinlock. On many platforms regulators reside on slow buses, such as
I2C/SPI and require sleep while accessing them.

The touchscreen itself is also a SPI device and currently relies on
asynchronous SPI access to avoid sleeping in interrupt context. Let's
switch to using threaded IRQ to be able to access SPI bus
synchronously (which simplifies driver a bit); it also allows safe
access to the regulators as well.

This has been tested on the ti_omap3530evm board:
 1) using ts_lib after normal boot
 2) using ts_lib after "#echo 1/0 > /sys/bus/spi/devices/spi0.1/disable"
 3) using ts_lib after "#echo mem > /sys/power/state" and "wake up"

Also tested on pandora.

Based on original patch by Dmitry Torokhov.

Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Jason Wang <jason77.wang@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/ads7846.c