Skip to contentSkip to conversation

Touch Screen: support on OMAP 3430

PATCH In review Girish 2 participants 2 messages Nov 2, 2007 – Nov 16, 2007

Subsystems (5)
lore
Share & tools
lore

Girish

author
#0 lore raw

PATCH 4/5 Touch Screen: support on OMAP 3430

This patch supports Touchscreen on 3430

---
 arch/arm/configs/omap_3430sdp_defconfig   |    3 -
 arch/arm/mach-omap2/board-3430sdp.c       |   90 ++++++++++++++++++++++++++++++
 drivers/input/touchscreen/ads7846.c       |    9 +++
 include/asm-arm/arch-omap/board-3430sdp.h |    9 +++
 include/asm-arm/arch-omap/gpio.h          |    2 
 include/linux/spi/ads7846.h               |    5 +
 6 files changed, 116 insertions(+), 2 deletions(-)
arch/arm/configs/omap_3430sdp_defconfig +2 -1
Index: linux-omap-git/arch/arm/configs/omap_3430sdp_defconfig
===================================================================
@@ -549,7 +549,8 @@
 # CONFIG_INPUT_MOUSE is not set
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TABLET is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
 # CONFIG_INPUT_MISC is not set
 
 #
arch/arm/mach-omap2/board-3430sdp.c +90 -0

120 lines not on this page · raw message

include/asm-arm/arch-omap/board-3430sdp.h +9 -0
Index: linux-omap-git/include/asm-arm/arch-omap/board-3430sdp.h
===================================================================
@@ -36,6 +36,15 @@
 #define OMAP34XX_ETHR_START		DEBUG_BASE
 #define OMAP34XX_ETHR_GPIO_IRQ		29
 
+/*
+ * GPIO used for TSC2046, TI's Touchscreen controller
+ */
+#ifdef CONFIG_OMAP3430_ES2
+#define TS_GPIO                2
+#else
+#define TS_GPIO                3
+#endif
+
 /* NAND */
 /* IMPORTANT NOTE ON MAPPING
  * 3430SDP - 343X
include/asm-arm/arch-omap/gpio.h +1 -1
Index: linux-omap-git/include/asm-arm/arch-omap/gpio.h
===================================================================
@@ -80,7 +80,7 @@
 extern void omap2_gpio_prepare_for_retention(void);
 extern void omap2_gpio_resume_after_retention(void);
 
-#ifdef CONFIG_ARCH_OMAP24XX
+#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX)
 extern void omap_set_gpio_debounce(int gpio, int enable);
 extern void omap_set_gpio_debounce_time(int gpio, int enable);
 #endif
include/linux/spi/ads7846.h +5 -0
Index: linux-omap-git/include/linux/spi/ads7846.h
===================================================================
@@ -47,5 +47,10 @@
 				 void **filter_data);
 	int	(*filter)	(void *filter_data, int data_idx, int *val);
 	void	(*filter_cleanup)(void *filter_data);
+
+	/* controls enabling/disabling*/
+	int	(*vaux_control)(int vaux_cntrl);
+#define VAUX_ENABLE	1
+#define VAUX_DISABLE	0
 };
 
drivers/input/touchscreen/ads7846.c +9 -0
Index: linux-omap-git/drivers/input/touchscreen/ads7846.c
===================================================================
@@ -838,6 +838,15 @@
 		return -ENODEV;
 	}
 
+	/* enable voltage */
+	if (pdata->vaux_control != NULL) {
+		err = pdata->vaux_control(VAUX_ENABLE);
+		if (err != 0) {
+			dev_dbg(&spi->dev, "TS vaux enable failed\n");
+			return err;
+		}
+	}
+
 	/* don't exceed max specified sample rate */
 	if (spi->max_speed_hz > (125000 * SAMPLE_BITS)) {
 		dev_dbg(&spi->dev, "f(sample) %d KHz?\n",
maintainer
#1 lore raw
Quoted 1 line · Girish

This patch supports Touchscreen on 3430

Pushing today.

Tony