From 3e36c0deea118e277f4ff9fa947bcde5f88426ca Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Fri, 6 Feb 2009 16:49:23 +0800 Subject: [ARM] pxa: make ads7846 on corgi and spitz to sync on HSYNC Signed-off-by: Eric Miao --- arch/arm/mach-pxa/spitz.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm/mach-pxa/spitz.c') 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 = { .num_chipselect = 3, }; +static void spitz_wait_for_hsync(void) +{ + while (gpio_get_value(SPITZ_GPIO_HSYNC)) + cpu_relax(); + + while (!gpio_get_value(SPITZ_GPIO_HSYNC)) + cpu_relax(); +} + static struct ads7846_platform_data spitz_ads7846_info = { .model = 7846, .vref_delay_usecs = 100, .x_plate_ohms = 419, .y_plate_ohms = 486, .gpio_pendown = SPITZ_GPIO_TP_INT, + .wait_for_sync = spitz_wait_for_hsync, }; static void spitz_ads7846_cs(u32 command) -- cgit v1.2.3-59-g8ed1b