Skip to contentSkip to conversation

cy8ctmg110: capacitive touchscreen support

PATCH In review Alan Cox 2 participants 3 messages Jul 9, 2010

Subsystems (2)
lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 cy8ctmg110: capacitive touchscreen support

Correct version this time

From: Samuli Konttila <[email protected]>

Add support for the cy8ctmg110 capacitive touchscreen used on some embedded devices.

(Some clean up by Alan Cox)

---

 drivers/input/touchscreen/Kconfig         |   14 +
 drivers/input/touchscreen/Makefile        |    1 
 drivers/input/touchscreen/cy8ctmg110_ts.c |  393 +++++++++++++++++++++++++++++
 include/linux/cy8ctmg110_pdata.h          |   10 +
 4 files changed, 418 insertions(+), 0 deletions(-)
 create mode 100644 drivers/input/touchscreen/cy8ctmg110_ts.c
 create mode 100644 include/linux/cy8ctmg110_pdata.h
drivers/input/touchscreen/Kconfig +14 -0
index 625e625..8393f47 100644
@@ -612,4 +612,18 @@ config TOUCHSCREEN_STMPE
 	  To compile this driver as a module, choose M here: the
 	  module will be called stmpe-ts.
 
+config TOUCHSCREEN_CY8CTMG110
+	tristate "cy8ctmg110 touchscreen"
+	depends on I2C
+	depends on GPIOLIB
+
+	help
+	  Say Y here if you have a cy8ctmg110 capacitive touchscreen on
+	  an AAVA device.
+
+	  If unsure, say N.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called cy8ctmg110_ts.
+
 endif
drivers/input/touchscreen/Makefile +1 -0
index 963fec2..662d066 100644
@@ -14,6 +14,7 @@ obj-$(CONFIG_TOUCHSCREEN_AD7879_SPI)	+= ad7879-spi.o
 obj-$(CONFIG_TOUCHSCREEN_ADS7846)	+= ads7846.o
 obj-$(CONFIG_TOUCHSCREEN_ATMEL_TSADCC)	+= atmel_tsadcc.o
 obj-$(CONFIG_TOUCHSCREEN_BITSY)		+= h3600_ts_input.o
+obj-$(CONFIG_TOUCHSCREEN_CY8CTMG110)    += cy8ctmg110_ts.o
 obj-$(CONFIG_TOUCHSCREEN_DYNAPRO)	+= dynapro.o
 obj-$(CONFIG_TOUCHSCREEN_HAMPSHIRE)	+= hampshire.o
 obj-$(CONFIG_TOUCHSCREEN_GUNZE)		+= gunze.o
drivers/input/touchscreen/cy8ctmg110_ts.c new file +393 -0

393 lines not on this page · raw message

include/linux/cy8ctmg110_pdata.h new file +10 -0
new file mode 100644
index 0000000..09522cb
@@ -0,0 +1,10 @@
+#ifndef _LINUX_CY8CTMG110_PDATA_H
+#define _LINUX_CY8CTMG110_PDATA_H
+
+struct cy8ctmg110_pdata
+{
+	int reset_pin;		/* Reset pin is wired to this GPIO (optional) */
+	int irq_pin;		/* IRQ pin is wired to this GPIO */
+};
+
+#endif
maintainer
#1 lore raw
Quoted 9 lines · Alan Cox

Correct version this time

From: Samuli Konttila <[email protected]>

Add support for the cy8ctmg110 capacitive touchscreen used on some embedded devices.

(Some clean up by Alan Cox)

Quoted 7 lines

---

 drivers/input/touchscreen/Kconfig         |   14 +
 drivers/input/touchscreen/Makefile        |    1 
 drivers/input/touchscreen/cy8ctmg110_ts.c |  393 +++++++++++++++++++++++++++++
 include/linux/cy8ctmg110_pdata.h          |   10 +

I'll move it into include/linux/input/cy8ctmg110_pdata.h and kill some useless comments and will apply to next, thanks Alan.

Hmm, I think device_init_wakeup() call is missing as well. And threaded IRQ being chared is somewhat unusual... But it is not oneshot so should be OK.

Signature · 1 line
Dmitry
author
#2 lore raw
Quoted 3 lines

Hmm, I think device_init_wakeup() call is missing as well. And threaded IRQ being chared is somewhat unusual... But it is not oneshot so should be OK.

I will double check these. I don't believe the IRQ can ever get shared but I'd need to double check with the Aava folks.