diff options
author | Eric Miao <eric.miao@marvell.com> | 2008-09-06 23:30:06 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-09-25 04:38:14 -0400 |
commit | ff7a4c7130c0ad97d55f7ab3f0a35fbc1f41b376 (patch) | |
tree | e24ccea4bdb38720511e63f2f870e84b6fb2d7ac /arch | |
parent | f72de6638b8e55283739de174b57c0ae4203c446 (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')
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 23 |
2 files changed, 9 insertions, 23 deletions
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index f8fd1d872157..5c08c4e9cd22 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -444,12 +444,6 @@ static struct pxa2xx_spi_chip corgi_ads7846_chip = { | |||
444 | .cs_control = corgi_ads7846_cs, | 444 | .cs_control = corgi_ads7846_cs, |
445 | }; | 445 | }; |
446 | 446 | ||
447 | static void corgi_notify_intensity(int intensity) | ||
448 | { | ||
449 | /* Bit 5 is via SCOOP */ | ||
450 | gpio_set_value(CORGI_GPIO_BACKLIGHT_CONT, !!(intensity & 0x0020)); | ||
451 | } | ||
452 | |||
453 | static void corgi_bl_kick_battery(void) | 447 | static void corgi_bl_kick_battery(void) |
454 | { | 448 | { |
455 | void (*kick_batt)(void); | 449 | void (*kick_batt)(void); |
@@ -466,7 +460,8 @@ static struct corgi_lcd_platform_data corgi_lcdcon_info = { | |||
466 | .max_intensity = 0x2f, | 460 | .max_intensity = 0x2f, |
467 | .default_intensity = 0x1f, | 461 | .default_intensity = 0x1f, |
468 | .limit_mask = 0x0b, | 462 | .limit_mask = 0x0b, |
469 | .notify = corgi_notify_intensity, | 463 | .gpio_backlight_cont = CORGI_GPIO_BACKLIGHT_CONT, |
464 | .gpio_backlight_on = -1, | ||
470 | .kick_battery = corgi_bl_kick_battery, | 465 | .kick_battery = corgi_bl_kick_battery, |
471 | }; | 466 | }; |
472 | 467 | ||
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 | ||
308 | static 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 | |||
323 | static void spitz_bl_kick_battery(void) | 308 | static 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; |