Skip to content

Commit

Permalink
[ARM] pxa: make ads7846 on corgi and spitz to sync on HSYNC
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Miao <eric.miao@marvell.com>
  • Loading branch information
Eric Miao committed Apr 27, 2009
1 parent 36b5437 commit 3e36c0d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/arm/mach-pxa/corgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 10 additions & 0 deletions arch/arm/mach-pxa/spitz.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3e36c0d

Please sign in to comment.