aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-clps711x/p720t.c
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2012-11-17 17:57:20 +0400
committerOlof Johansson <olof@lixom.net>2012-11-21 09:57:45 -0800
commit94760bf2523b4b5d3938e85ea0964ca7cd59a42b (patch)
tree93643ae945d3a3fc6e37325f268cda2fe3e7ddc4 /arch/arm/mach-clps711x/p720t.c
parente377ca1e32f66378cc6d0562851bfc51126865ea (diff)
ARM: clps711x: Moving backlight controls of framebuffer driver to the board
This patch moves the backlight controls for clps711x-framebuffer driver to the board code. To control we use "generic-bl" driver. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> [olof: fixed space/tab whitespace in drivers/video/clps711xfb.c] 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.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c
index e25f10ed560..1518fc83bab 100644
--- a/arch/arm/mach-clps711x/p720t.c
+++ b/arch/arm/mach-clps711x/p720t.c
@@ -25,6 +25,8 @@
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/leds.h>
+#include <linux/sizes.h>
+#include <linux/backlight.h>
#include <linux/platform_device.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand-gpio.h>
@@ -33,7 +35,6 @@
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/setup.h>
-#include <asm/sizes.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -103,6 +104,21 @@ static struct plat_lcd_data p720t_lcd_power_pdata = {
.set_power = p720t_lcd_power_set,
};
+static void p720t_lcd_backlight_set_intensity(int intensity)
+{
+ if (intensity)
+ PLD_PWR |= PLD_S3_ON;
+ else
+ PLD_PWR = 0;
+}
+
+static struct generic_bl_info p720t_lcd_backlight_pdata = {
+ .name = "lcd-backlight.0",
+ .default_intensity = 0x01,
+ .max_intensity = 0x01,
+ .set_bl_intensity = p720t_lcd_backlight_set_intensity,
+};
+
/*
* Map the P720T system PLD. It occupies two address spaces:
* 0x10000000 and 0x10400000. We map both regions as one.
@@ -187,6 +203,9 @@ 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_data(&platform_bus, "generic-bl", 0,
+ &p720t_lcd_backlight_pdata,
+ sizeof(p720t_lcd_backlight_pdata));
platform_device_register_simple("video-clps711x", 0, NULL, 0);
}