Input: wm831x - Add driver for Wolfson WM831x PMIC touchscreen controllers
PATCH 1/1 Input: wm831x - Add driver for Wolfson WM831x PMIC touchscreen controllers
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 <[email protected]>
Tested-by Julien Boibessot <[email protected]>
--- drivers/input/touchscreen/Kconfig | 10 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/wm831x-ts.c | 370 +++++++++++++++++++++++++++++++++ include/linux/mfd/wm831x/pdata.h | 3 +- 4 files changed, 383 insertions(+), 1 deletions(-) create mode 100644 drivers/input/touchscreen/wm831x-ts.c
drivers/input/touchscreen/Kconfig +10 -0
@@ -423,6 +423,16 @@ config TOUCHSCREEN_UCB1400 To compile this driver as a module, choose M here: the module will be called ucb1400_ts. +config TOUCHSCREEN_WM831X + tristate "Support for WM831x touchscreen controllers" + depends on MFD_WM831X + help + This enables support for the touchscreen controller on the WM831x + series of PMICs. + + To compile this driver as a module, choose M here: the + module will be called wm831x-ts. + config TOUCHSCREEN_WM97XX tristate "Support for WM97xx AC97 touchscreen controllers" depends on AC97_BUS
drivers/input/touchscreen/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o obj-$(CONFIG_TOUCHSCREEN_TSC2007) += tsc2007.o obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o obj-$(CONFIG_TOUCHSCREEN_WACOM_W8001) += wacom_w8001.o +obj-$(CONFIG_TOUCHSCREEN_WM831X) += wm831x-ts.o obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9705) += wm9705.o wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9712) += wm9712.o
drivers/input/touchscreen/wm831x-ts.c new file +370 -0
370 lines not on this page · raw message
include/linux/mfd/wm831x/pdata.h +2 -1
@@ -80,7 +80,8 @@ struct wm831x_touch_pdata {int isel;/** Current for pen down (uA) */ int rpu;/** Pen down sensitivity resistor divider */ int pressure;/** Report pressure (boolean) */ -int data_irq;/** Touch data ready IRQ */ +unsigned int data_irq;/** Touch data ready IRQ */ +unsigned int pd_irq;/** Touch pendown detect IRQ */ };enum wm831x_watchdog_action {
Signature · 1 line
1.7.2.3