aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/corgi.c
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-09-05 06:15:22 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-09-23 17:04:39 -0400
commit6168cda927ecdf3347537e0d01618ca2a2272007 (patch)
tree4ebd67abd724ed3af2a8c3c555d221761b6042f5 /arch/arm/mach-pxa/corgi.c
parent2d91f94174ce42378aafc7bedda2588a913d3eab (diff)
[ARM] pxa/corgi: use generic GPIO API for SCOOP GPIOs
Original patch from Dmitry Baryshkov's inital scoop gpio conversion work at http://git.infradead.org/users/dbaryshkov/zaurus-2.6.git. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/corgi.c')
-rw-r--r--arch/arm/mach-pxa/corgi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 68765636bfce..da1e60190706 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -127,6 +127,7 @@ static struct resource corgi_scoop_resources[] = {
127static struct scoop_config corgi_scoop_setup = { 127static struct scoop_config corgi_scoop_setup = {
128 .io_dir = CORGI_SCOOP_IO_DIR, 128 .io_dir = CORGI_SCOOP_IO_DIR,
129 .io_out = CORGI_SCOOP_IO_OUT, 129 .io_out = CORGI_SCOOP_IO_OUT,
130 .gpio_base = CORGI_SCOOP_GPIO_BASE,
130}; 131};
131 132
132struct platform_device corgiscoop_device = { 133struct platform_device corgiscoop_device = {
@@ -426,10 +427,7 @@ static struct pxa2xx_spi_chip corgi_ads7846_chip = {
426static void corgi_notify_intensity(int intensity) 427static void corgi_notify_intensity(int intensity)
427{ 428{
428 /* Bit 5 is via SCOOP */ 429 /* Bit 5 is via SCOOP */
429 if (intensity & 0x0020) 430 gpio_set_value(CORGI_GPIO_BACKLIGHT_CONT, !!(intensity & 0x0020));
430 set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_BACKLIGHT_CONT);
431 else
432 reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_BACKLIGHT_CONT);
433} 431}
434 432
435static void corgi_bl_kick_battery(void) 433static void corgi_bl_kick_battery(void)
@@ -539,7 +537,8 @@ static void corgi_poweroff(void)
539{ 537{
540 if (!machine_is_corgi()) 538 if (!machine_is_corgi())
541 /* Green LED off tells the bootloader to halt */ 539 /* Green LED off tells the bootloader to halt */
542 reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN); 540 gpio_set_value(CORGI_GPIO_LED_GREEN, 0);
541
543 arm_machine_restart('h'); 542 arm_machine_restart('h');
544} 543}
545 544
@@ -547,7 +546,8 @@ static void corgi_restart(char mode)
547{ 546{
548 if (!machine_is_corgi()) 547 if (!machine_is_corgi())
549 /* Green LED on tells the bootloader to reboot */ 548 /* Green LED on tells the bootloader to reboot */
550 set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN); 549 gpio_set_value(CORGI_GPIO_LED_GREEN, 1);
550
551 arm_machine_restart('h'); 551 arm_machine_restart('h');
552} 552}
553 553