summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/wm831x-ts.c
Commit message (Collapse)AuthorAgeFilesLines
* Input: touchscreen - use macro module_platform_driver()JJ Ding2011-12-011-12/+1Star
| | | | | | | | Commit 940ab88962bc1aff3273a8356d64577a6e386736 introduced a new macro to save some platform_driver boilerplate code. Use it. Signed-off-by: JJ Ding <dgdunix@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wm831x-ts - move BTN_TOUCH reporting to data transferMark Brown2011-04-281-3/+2Star
| | | | | | | | | Don't report BTN_TOUCH until we've got data as some less robust applications can be confused by getting a touch event by itself and it doesn't seem unreasonable for them to expect coordinates along with a touch. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wm831x-ts - allow IRQ flags to be specifiedMark Brown2011-04-281-3/+13
| | | | | | | | This allows maximum flexibility for configuring the direct GPIO based interrupts. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wm831x-ts - fix races with IRQ managementMark Brown2011-04-281-5/+49
| | | | | | | | | | | | | | | | | | | | | If the WM831x pen down and data IRQs run in parallel it is possible for the data and pen down IRQs to deadlock themselves as one is part way through disabling its operation while the other is part way through enabling. Fix this by always disabling the pen down interrupt while data is active and vice versa. When a changeover is required we disable the IRQ that is to be stopped then schedule work that will enable the new IRQ. We need to handle the data flow in the data IRQ as the readback from the device needs to be ordered correctly with the IRQ for robust operation. This also fixes an issue when using the built in IRQs due to enable_irq() not being valid from interrupt context on an interrupt controller with bus operations like the built in IRQ controller - this issue may also have affected other interrupt controllers. We can't rely on having the data and pen down IRQs available via GPIOs on the CPU on every system. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wm831x-ts - ensure the controller is in a known state on openMark Brown2011-03-151-1/+3
| | | | | | | | Explicitly set all the enable bits when opening the device just in case something left the device in an unexpected state. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wm831x-ts - default pressure measurements onMark Brown2011-03-131-1/+4
| | | | | | | | tslib expects pressure measurements so enable them by default for better compatibility. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wm831x-ts - remove use of ternary operatorMark Brown2011-02-011-5/+13
| | | | | | | | | While being applied the driver was modified to add use of the ternary operator. Write the conditionals out longhand as I find it terribly unhelpful for legibility. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wm831x - add driver for Wolfson WM831x PMIC touchscreen controllersMark Brown2011-01-301-0/+355
Some of the WM831x series of PMICs from Wolfson Microelectronics include a resistive touchscreen controller. Implement support for these controllers within the input API. Platform data is supported to allow configuration of system parameters such as selection between four and five wire touchscreens and for specification of optional direct to CPU IRQs for sample availability and for pen down. Use of this feature for at least the data IRQ is strongly recommended. Thanks to Julien Boibessot for extensive testing and detailed feedback. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Julien Boibessot <julien.boibessot@armadeus.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>