diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2012-11-17 08:57:20 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-11-21 12:57:45 -0500 |
commit | 94760bf2523b4b5d3938e85ea0964ca7cd59a42b (patch) | |
tree | 93643ae945d3a3fc6e37325f268cda2fe3e7ddc4 /arch/arm/mach-clps711x/p720t.c | |
parent | e377ca1e32f66378cc6d0562851bfc51126865ea (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.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c index e25f10ed5606..1518fc83babd 100644 --- a/arch/arm/mach-clps711x/p720t.c +++ b/arch/arm/mach-clps711x/p720t.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/leds.h> | 27 | #include <linux/leds.h> |
28 | #include <linux/sizes.h> | ||
29 | #include <linux/backlight.h> | ||
28 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
29 | #include <linux/mtd/partitions.h> | 31 | #include <linux/mtd/partitions.h> |
30 | #include <linux/mtd/nand-gpio.h> | 32 | #include <linux/mtd/nand-gpio.h> |
@@ -33,7 +35,6 @@ | |||
33 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
34 | #include <asm/page.h> | 36 | #include <asm/page.h> |
35 | #include <asm/setup.h> | 37 | #include <asm/setup.h> |
36 | #include <asm/sizes.h> | ||
37 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
38 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
39 | #include <asm/mach/map.h> | 40 | #include <asm/mach/map.h> |
@@ -103,6 +104,21 @@ static struct plat_lcd_data p720t_lcd_power_pdata = { | |||
103 | .set_power = p720t_lcd_power_set, | 104 | .set_power = p720t_lcd_power_set, |
104 | }; | 105 | }; |
105 | 106 | ||
107 | static void p720t_lcd_backlight_set_intensity(int intensity) | ||
108 | { | ||
109 | if (intensity) | ||
110 | PLD_PWR |= PLD_S3_ON; | ||
111 | else | ||
112 | PLD_PWR = 0; | ||
113 | } | ||
114 | |||
115 | static struct generic_bl_info p720t_lcd_backlight_pdata = { | ||
116 | .name = "lcd-backlight.0", | ||
117 | .default_intensity = 0x01, | ||
118 | .max_intensity = 0x01, | ||
119 | .set_bl_intensity = p720t_lcd_backlight_set_intensity, | ||
120 | }; | ||
121 | |||
106 | /* | 122 | /* |
107 | * Map the P720T system PLD. It occupies two address spaces: | 123 | * Map the P720T system PLD. It occupies two address spaces: |
108 | * 0x10000000 and 0x10400000. We map both regions as one. | 124 | * 0x10000000 and 0x10400000. We map both regions as one. |
@@ -187,6 +203,9 @@ static void __init p720t_init(void) | |||
187 | platform_device_register_data(&platform_bus, "platform-lcd", 0, | 203 | platform_device_register_data(&platform_bus, "platform-lcd", 0, |
188 | &p720t_lcd_power_pdata, | 204 | &p720t_lcd_power_pdata, |
189 | sizeof(p720t_lcd_power_pdata)); | 205 | sizeof(p720t_lcd_power_pdata)); |
206 | platform_device_register_data(&platform_bus, "generic-bl", 0, | ||
207 | &p720t_lcd_backlight_pdata, | ||
208 | sizeof(p720t_lcd_backlight_pdata)); | ||
190 | platform_device_register_simple("video-clps711x", 0, NULL, 0); | 209 | platform_device_register_simple("video-clps711x", 0, NULL, 0); |
191 | } | 210 | } |
192 | 211 | ||