diff options
author | Eric Miao <eric.miao@marvell.com> | 2009-02-06 16:49:23 +0800 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2009-04-27 11:45:53 +0800 |
commit | 3e36c0deea118e277f4ff9fa947bcde5f88426ca (patch) | |
tree | da650c6368cf1bbce39666466998a39b53880368 /arch/arm/mach-pxa/corgi.c | |
parent | 36b5437f33fb95196bef2345dede39fdcab3e431 (diff) | |
download | linux-stable-3e36c0deea118e277f4ff9fa947bcde5f88426ca.tar.gz linux-stable-3e36c0deea118e277f4ff9fa947bcde5f88426ca.tar.bz2 linux-stable-3e36c0deea118e277f4ff9fa947bcde5f88426ca.zip |
[ARM] pxa: make ads7846 on corgi and spitz to sync on HSYNC
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-pxa/corgi.c')
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 10 |
1 files changed, 10 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 = { .num_chipselect = 3, }; +static void corgi_wait_for_hsync(void) +{ + while (gpio_get_value(CORGI_GPIO_HSYNC)) + cpu_relax(); + + while (!gpio_get_value(CORGI_GPIO_HSYNC)) + cpu_relax(); +} + static struct ads7846_platform_data corgi_ads7846_info = { .model = 7846, .vref_delay_usecs = 100, .x_plate_ohms = 419, .y_plate_ohms = 486, .gpio_pendown = CORGI_GPIO_TP_INT, + .wait_for_sync = corgi_wait_for_hsync, }; static void corgi_ads7846_cs(u32 command) |