From: Mika Laitio Date: Mon, 19 Jan 2009 23:08:59 +0000 (+0200) Subject: h63xx: touchscreen support X-Git-Tag: v2.6.16-omap1-h63xx-1~5 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?p=linux-2.6-omap-h63xx.git;a=commitdiff_plain;h=7410ae4d0a961b5cd9b67f91aa5b7dcf62eb7f3f h63xx: touchscreen support --- diff --git a/arch/arm/configs/omap_h63xx_defconfig b/arch/arm/configs/omap_h63xx_defconfig index 786e2337ddd..20d37c41b10 100644 --- a/arch/arm/configs/omap_h63xx_defconfig +++ b/arch/arm/configs/omap_h63xx_defconfig @@ -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 diff --git a/arch/arm/mach-omap1/board-h6300.c b/arch/arm/mach-omap1/board-h6300.c index 14173037593..71caef9ea15 100644 --- a/arch/arm/mach-omap1/board-h6300.c +++ b/arch/arm/mach-omap1/board-h6300.c @@ -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) diff --git a/drivers/input/touchscreen/omap/Makefile b/drivers/input/touchscreen/omap/Makefile index 687c068fd76..2f191da02de 100644 --- a/drivers/input/touchscreen/omap/Makefile +++ b/drivers/input/touchscreen/omap/Makefile @@ -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) diff --git a/drivers/input/touchscreen/omap/omap_ts.c b/drivers/input/touchscreen/omap/omap_ts.c index d5b6fb3d4d2..1063794deec 100644 --- a/drivers/input/touchscreen/omap/omap_ts.c +++ b/drivers/input/touchscreen/omap/omap_ts.c @@ -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 diff --git a/drivers/input/touchscreen/omap/ts_hx.c b/drivers/input/touchscreen/omap/ts_hx.c index f148f19765e..98808736174 100644 --- a/drivers/input/touchscreen/omap/ts_hx.c +++ b/drivers/input/touchscreen/omap/ts_hx.c @@ -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