summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-09-07 11:30:06 +0800
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-09-25 09:38:14 +0100
commitff7a4c7130c0ad97d55f7ab3f0a35fbc1f41b376 (patch)
treee24ccea4bdb38720511e63f2f870e84b6fb2d7ac /arch
parentf72de6638b8e55283739de174b57c0ae4203c446 (diff)
downloadop-kernel-dev-ff7a4c7130c0ad97d55f7ab3f0a35fbc1f41b376.zip
op-kernel-dev-ff7a4c7130c0ad97d55f7ab3f0a35fbc1f41b376.tar.gz
[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.c9
-rw-r--r--arch/arm/mach-pxa/spitz.c23
2 files changed, 9 insertions, 23 deletions
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index f8fd1d8..5c08c4e 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 = {
.cs_control = corgi_ads7846_cs,
};
-static void corgi_notify_intensity(int intensity)
-{
- /* Bit 5 is via SCOOP */
- gpio_set_value(CORGI_GPIO_BACKLIGHT_CONT, !!(intensity & 0x0020));
-}
-
static void corgi_bl_kick_battery(void)
{
void (*kick_batt)(void);
@@ -466,7 +460,8 @@ static struct corgi_lcd_platform_data corgi_lcdcon_info = {
.max_intensity = 0x2f,
.default_intensity = 0x1f,
.limit_mask = 0x0b,
- .notify = corgi_notify_intensity,
+ .gpio_backlight_cont = CORGI_GPIO_BACKLIGHT_CONT,
+ .gpio_backlight_on = -1,
.kick_battery = corgi_bl_kick_battery,
};
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 1d8654d..245890d 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 = {
.cs_control = spitz_ads7846_cs,
};
-static void spitz_notify_intensity(int intensity)
-{
- if (machine_is_spitz() || machine_is_borzoi()) {
- gpio_set_value(SPITZ_GPIO_BACKLIGHT_CONT, !(intensity & 0x20));
- gpio_set_value(SPITZ_GPIO_BACKLIGHT_ON, intensity);
- return;
- }
-
- if (machine_is_akita()) {
- gpio_set_value(AKITA_GPIO_BACKLIGHT_CONT, !(intensity & 0x20));
- gpio_set_value(AKITA_GPIO_BACKLIGHT_ON, intensity);
- return;
- }
-}
-
static void spitz_bl_kick_battery(void)
{
void (*kick_batt)(void);
@@ -336,7 +321,8 @@ static struct corgi_lcd_platform_data spitz_lcdcon_info = {
.max_intensity = 0x2f,
.default_intensity = 0x1f,
.limit_mask = 0x0b,
- .notify = spitz_notify_intensity,
+ .gpio_backlight_cont = SPITZ_GPIO_BACKLIGHT_CONT,
+ .gpio_backlight_on = SPITZ_GPIO_BACKLIGHT_ON,
.kick_battery = spitz_bl_kick_battery,
};
@@ -399,6 +385,11 @@ static void __init spitz_init_spi(void)
if (err)
goto err_free_2;
+ if (machine_is_akita()) {
+ spitz_lcdcon_info.gpio_backlight_cont = AKITA_GPIO_BACKLIGHT_CONT;
+ spitz_lcdcon_info.gpio_backlight_on = AKITA_GPIO_BACKLIGHT_ON;
+ }
+
pxa2xx_set_spi_info(2, &spitz_spi_info);
spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices));
return;
OpenPOWER on IntegriCloud