]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
h63xx: touchscreen support
authorMika Laitio <lamikr@pilppa.org>
Mon, 19 Jan 2009 23:08:59 +0000 (01:08 +0200)
committerMika Laitio <lamikr@pilppa.org>
Mon, 19 Jan 2009 23:08:59 +0000 (01:08 +0200)
arch/arm/configs/omap_h63xx_defconfig
arch/arm/mach-omap1/board-h6300.c
drivers/input/touchscreen/omap/Makefile
drivers/input/touchscreen/omap/omap_ts.c
drivers/input/touchscreen/omap/ts_hx.c

index 786e2337ddd5aa4d149170fb0646932206dc984a..20d37c41b10344f9f806789c58593682f8de3158 100644 (file)
@@ -796,7 +796,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
 # CONFIG_TOUCHSCREEN_ELO is not set
 # CONFIG_TOUCHSCREEN_MTOUCH is not set
 # CONFIG_TOUCHSCREEN_MK712 is not set
-# CONFIG_TOUCHSCREEN_OMAP is not set
+CONFIG_TOUCHSCREEN_OMAP=m
 CONFIG_INPUT_MISC=y
 CONFIG_INPUT_UINPUT=m
 
index 14173037593b9699b5ffa40d3196d97e69769a8e..71caef9ea150cc8954e33a58affa609ae371d61b 100644 (file)
@@ -64,6 +64,11 @@ static void __init h6300_init_irq(void)
        omap1_init_common_hw();
        omap_init_irq();
        omap_gpio_init();
+/* touchscreen gpio setup is now done in the drivers/input/touschreen/omap/ts_hx.c
+       omap_request_gpio(2);
+       omap_set_gpio_direction(2, 0);
+       omap_set_gpio_dataout(2, 1);
+*/
 }
 
 static void __init h6300_init(void)
index 687c068fd768e78695cef81125ba1964b79767c8..2f191da02de7f5c8fb093b9c5c71ba188c2563f7 100644 (file)
@@ -8,5 +8,6 @@ objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_H2) += ts_hx.o
 objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_H3) += ts_hx.o
 objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += ts_inn1510.o
 objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_OSK) += ts_osk.o
+objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_H6300) += ts_hx.o
 
 omapts-objs := omap_ts.o $(objs-yy)
index d5b6fb3d4d2173d03472616ca7cec5b8e90f439d..1063794deec0606d222b726a26b3b6a3257b5d09 100644 (file)
@@ -46,7 +46,7 @@
 #define OMAP_TS_NAME   "omap_ts"
 
 static struct ts_device *__initdata ts_devs[] = {
-#if defined(CONFIG_MACH_OMAP_H2) || defined(CONFIG_MACH_OMAP_H3)
+#if defined(CONFIG_MACH_OMAP_H2) || defined(CONFIG_MACH_OMAP_H3) || defined(CONFIG_MACH_OMAP_H6300)
        &hx_ts,
 #endif
 #ifdef CONFIG_MACH_OMAP_OSK
index f148f19765e011cd7b51084734276750e4abe659..98808736174794d59e20ca663c5aaf5bf50f0c08 100644 (file)
@@ -39,6 +39,7 @@
 
 #define        H2_GPIO_NUM             4
 #define        H3_GPIO_NUM             48
+#define H6300_GPIO_NUM 2
 
 #define OMAP_TSC2101_XRES                     500
 #define TOUCHSCREEN_DATA_REGISTERS_PAGE         0x0
@@ -88,6 +89,9 @@ static int __init hx_ts_probe(struct omap_ts_t *ts)
        } else if (machine_is_omap_h3()) {
                gpio = H3_GPIO_NUM;
                omap_cfg_reg(W19_1610_GPIO48);
+       } else if (machine_is_omap_h6300 ()) {
+               gpio = H6300_GPIO_NUM;
+               omap_cfg_reg(M14_1510_GPIO2);   
        } else
                return -ENODEV;
 
@@ -180,5 +184,7 @@ static void __exit hx_ts_remove(void)
                omap_free_gpio(H2_GPIO_NUM);
        else if (machine_is_omap_h3())
                omap_free_gpio(H3_GPIO_NUM);
+       else if (machine_is_omap_h6300())
+               omap_free_gpio(H6300_GPIO_NUM);
 }
 #endif