diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2012-11-17 14:57:18 +0100 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-11-21 18:57:44 +0100 |
commit | 87c37b51ade7d1296ab99ed8f237637bed7779c7 (patch) | |
tree | 615582ab943b3f0c2e587668d09e7d38d6e0289c /arch/arm/mach-clps711x/p720t.c | |
parent | ARM: clps711x: autcpu12: Special driver for handling NAND memory is removed (diff) | |
download | linux-87c37b51ade7d1296ab99ed8f237637bed7779c7.tar.xz linux-87c37b51ade7d1296ab99ed8f237637bed7779c7.zip |
ARM: clps711x: Moving power management of framebuffer driver to the board
This patch moves the power management for clps711x-framebuffer driver
to the board code. To control we use "platform-lcd" driver.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-clps711x/p720t.c')
-rw-r--r-- | arch/arm/mach-clps711x/p720t.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c index a58a0585e3e7..34c8ee9ebb5e 100644 --- a/arch/arm/mach-clps711x/p720t.c +++ b/arch/arm/mach-clps711x/p720t.c @@ -37,10 +37,27 @@ #include <asm/mach/map.h> #include <mach/syspld.h> +#include <video/platform_lcd.h> + #include "common.h" #define GPIO_USERLED CLPS711X_GPIO(3, 0) +static void p720t_lcd_power_set(struct plat_lcd_data *pd, unsigned int power) +{ + if (power) { + PLD_LCDEN = PLD_LCDEN_EN; + PLD_PWR |= PLD_S4_ON | PLD_S2_ON | PLD_S1_ON; + } else { + PLD_PWR &= ~(PLD_S4_ON | PLD_S2_ON | PLD_S1_ON); + PLD_LCDEN = 0; + } +} + +static struct plat_lcd_data p720t_lcd_power_pdata = { + .set_power = p720t_lcd_power_set, +}; + /* * Map the P720T system PLD. It occupies two address spaces: * 0x10000000 and 0x10400000. We map both regions as one. @@ -121,6 +138,9 @@ static struct gpio_led_platform_data p720t_gpio_led_pdata __initdata = { static void __init p720t_init(void) { + platform_device_register_data(&platform_bus, "platform-lcd", 0, + &p720t_lcd_power_pdata, + sizeof(p720t_lcd_power_pdata)); platform_device_register_simple("video-clps711x", 0, NULL, 0); } |