From 513b6e1afaf81b42cacbb24ef1aa7eea5e9661c2 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 13 Sep 2005 01:25:33 -0700 Subject: [PATCH] SharpSL: Abstract c7x0 specifics from Corgi Touchscreen driver Separate out the Sharp Zaurus c7x0 series specific code from the Corgi Touchscreen driver. Use the new functions in corgi_lcd.c via sharpsl.h for hsync handling and pass the IRQ as a platform device resource. Move a function prototype into the w100fb header file where it belongs. This enables the driver to be used by the Zaurus cxx00 series. Signed-Off-by: Richard Purdie Cc: Vojtech Pavlik Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/arm/mach-pxa/corgi.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'arch/arm/mach-pxa/corgi.c') diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 3678d1e0e826..fc428b827671 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -130,12 +130,29 @@ static struct platform_device corgikbd_device = { /* * Corgi Touch Screen Device */ +static struct resource corgits_resources[] = { + [0] = { + .start = CORGI_IRQ_GPIO_TP_INT, + .end = CORGI_IRQ_GPIO_TP_INT, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct corgits_machinfo corgi_ts_machinfo = { + .get_hsync_len = corgi_get_hsync_len, + .put_hsync = corgi_put_hsync, + .wait_hsync = corgi_wait_hsync, +}; + static struct platform_device corgits_device = { .name = "corgi-ts", .dev = { .parent = &corgissp_device.dev, + .platform_data = &corgi_ts_machinfo, }, .id = -1, + .num_resources = ARRAY_SIZE(corgits_resources), + .resource = corgits_resources, }; @@ -239,6 +256,7 @@ static void __init corgi_init(void) corgi_ssp_set_machinfo(&corgi_ssp_machinfo); pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT); + pxa_gpio_mode(CORGI_GPIO_HSYNC | GPIO_IN); pxa_set_udc_info(&udc_info); pxa_set_mci_info(&corgi_mci_platform_data); -- cgit v1.2.3