Skip to contentSkip to conversation

Input: wm831x - Add driver for Wolfson WM831x PMIC touchscreen controllers

PATCH New Mark Brown 1 participant 1 message Jan 25, 2011

Subsystems (4)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

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.

---
 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
index 0c9f4b1..46656b0 100644
@@ -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
index 718bcc8..e8dcfab 100644
@@ -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
index fd322ac..173086d 100644
@@ -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