aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/spitz.c
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-09-06 23:30:06 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-09-25 04:38:14 -0400
commitff7a4c7130c0ad97d55f7ab3f0a35fbc1f41b376 (patch)
treee24ccea4bdb38720511e63f2f870e84b6fb2d7ac /arch/arm/mach-pxa/spitz.c
parentf72de6638b8e55283739de174b57c0ae4203c446 (diff)
[ARM] corgi_lcd: use GPIO API for BACKLIGHT_ON and BACKLIGHT_CONT
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/spitz.c')
-rw-r--r--arch/arm/mach-pxa/spitz.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 1d8654d2fb96..245890d2b6b5 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -305,21 +305,6 @@ static struct pxa2xx_spi_chip spitz_ads7846_chip = {
305 .cs_control = spitz_ads7846_cs, 305 .cs_control = spitz_ads7846_cs,
306}; 306};
307 307
308static void spitz_notify_intensity(int intensity)
309{
310 if (machine_is_spitz() || machine_is_borzoi()) {
311 gpio_set_value(SPITZ_GPIO_BACKLIGHT_CONT, !(intensity & 0x20));
312 gpio_set_value(SPITZ_GPIO_BACKLIGHT_ON, intensity);
313 return;
314 }
315
316 if (machine_is_akita()) {
317 gpio_set_value(AKITA_GPIO_BACKLIGHT_CONT, !(intensity & 0x20));
318 gpio_set_value(AKITA_GPIO_BACKLIGHT_ON, intensity);
319 return;
320 }
321}
322
323static void spitz_bl_kick_battery(void) 308static void spitz_bl_kick_battery(void)
324{ 309{
325 void (*kick_batt)(void); 310 void (*kick_batt)(void);
@@ -336,7 +321,8 @@ static struct corgi_lcd_platform_data spitz_lcdcon_info = {
336 .max_intensity = 0x2f, 321 .max_intensity = 0x2f,
337 .default_intensity = 0x1f, 322 .default_intensity = 0x1f,
338 .limit_mask = 0x0b, 323 .limit_mask = 0x0b,
339 .notify = spitz_notify_intensity, 324 .gpio_backlight_cont = SPITZ_GPIO_BACKLIGHT_CONT,
325 .gpio_backlight_on = SPITZ_GPIO_BACKLIGHT_ON,
340 .kick_battery = spitz_bl_kick_battery, 326 .kick_battery = spitz_bl_kick_battery,
341}; 327};
342 328
@@ -399,6 +385,11 @@ static void __init spitz_init_spi(void)
399 if (err) 385 if (err)
400 goto err_free_2; 386 goto err_free_2;
401 387
388 if (machine_is_akita()) {
389 spitz_lcdcon_info.gpio_backlight_cont = AKITA_GPIO_BACKLIGHT_CONT;
390 spitz_lcdcon_info.gpio_backlight_on = AKITA_GPIO_BACKLIGHT_ON;
391 }
392
402 pxa2xx_set_spi_info(2, &spitz_spi_info); 393 pxa2xx_set_spi_info(2, &spitz_spi_info);
403 spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices)); 394 spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices));
404 return; 395 return;