diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index cdf21dd135b4..930e364ccde9 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -427,12 +427,22 @@ static struct pxa2xx_spi_master corgi_spi_info = { | |||
427 | .num_chipselect = 3, | 427 | .num_chipselect = 3, |
428 | }; | 428 | }; |
429 | 429 | ||
430 | static void corgi_wait_for_hsync(void) | ||
431 | { | ||
432 | while (gpio_get_value(CORGI_GPIO_HSYNC)) | ||
433 | cpu_relax(); | ||
434 | |||
435 | while (!gpio_get_value(CORGI_GPIO_HSYNC)) | ||
436 | cpu_relax(); | ||
437 | } | ||
438 | |||
430 | static struct ads7846_platform_data corgi_ads7846_info = { | 439 | static struct ads7846_platform_data corgi_ads7846_info = { |
431 | .model = 7846, | 440 | .model = 7846, |
432 | .vref_delay_usecs = 100, | 441 | .vref_delay_usecs = 100, |
433 | .x_plate_ohms = 419, | 442 | .x_plate_ohms = 419, |
434 | .y_plate_ohms = 486, | 443 | .y_plate_ohms = 486, |
435 | .gpio_pendown = CORGI_GPIO_TP_INT, | 444 | .gpio_pendown = CORGI_GPIO_TP_INT, |
445 | .wait_for_sync = corgi_wait_for_hsync, | ||
436 | }; | 446 | }; |
437 | 447 | ||
438 | static void corgi_ads7846_cs(u32 command) | 448 | static void corgi_ads7846_cs(u32 command) |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 8c61ddac119e..c18e34acafcb 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -299,12 +299,22 @@ static struct pxa2xx_spi_master spitz_spi_info = { | |||
299 | .num_chipselect = 3, | 299 | .num_chipselect = 3, |
300 | }; | 300 | }; |
301 | 301 | ||
302 | static void spitz_wait_for_hsync(void) | ||
303 | { | ||
304 | while (gpio_get_value(SPITZ_GPIO_HSYNC)) | ||
305 | cpu_relax(); | ||
306 | |||
307 | while (!gpio_get_value(SPITZ_GPIO_HSYNC)) | ||
308 | cpu_relax(); | ||
309 | } | ||
310 | |||
302 | static struct ads7846_platform_data spitz_ads7846_info = { | 311 | static struct ads7846_platform_data spitz_ads7846_info = { |
303 | .model = 7846, | 312 | .model = 7846, |
304 | .vref_delay_usecs = 100, | 313 | .vref_delay_usecs = 100, |
305 | .x_plate_ohms = 419, | 314 | .x_plate_ohms = 419, |
306 | .y_plate_ohms = 486, | 315 | .y_plate_ohms = 486, |
307 | .gpio_pendown = SPITZ_GPIO_TP_INT, | 316 | .gpio_pendown = SPITZ_GPIO_TP_INT, |
317 | .wait_for_sync = spitz_wait_for_hsync, | ||
308 | }; | 318 | }; |
309 | 319 | ||
310 | static void spitz_ads7846_cs(u32 command) | 320 | static void spitz_ads7846_cs(u32 command) |