summaryrefslogtreecommitdiff
path: root/arch/arm/mach-clps711x/p720t.c
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2012-11-17 13:57:18 (GMT)
committerOlof Johansson <olof@lixom.net>2012-11-21 17:57:44 (GMT)
commit87c37b51ade7d1296ab99ed8f237637bed7779c7 (patch)
tree615582ab943b3f0c2e587668d09e7d38d6e0289c /arch/arm/mach-clps711x/p720t.c
parent90383e0ac2ae3df283f2b56997040f71f6d1df08 (diff)
downloadlinux-fsl-qoriq-87c37b51ade7d1296ab99ed8f237637bed7779c7.tar.xz
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.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c
index a58a058..34c8ee9 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);
}