diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2013-05-13 13:07:35 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-06-11 18:47:43 -0400 |
commit | e337d724e8ec40f80ade3371c002454f419a2c87 (patch) | |
tree | 3f076efa8cf171d2b6546d3ebd4b1b5737245758 /arch/arm/mach-clps711x | |
parent | 362168f86e947ace670e0f670e558994d388ed6a (diff) |
ARM: clps711x: edb7211: Control LCD backlight via PWM
This patch provide control LCD backlight via PWM. GPIO is used
only for switch backlight ON and OFF.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-clps711x')
-rw-r--r-- | arch/arm/mach-clps711x/board-edb7211.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-clps711x/board-edb7211.c b/arch/arm/mach-clps711x/board-edb7211.c index 970f4e17ba76..9dfb990f0801 100644 --- a/arch/arm/mach-clps711x/board-edb7211.c +++ b/arch/arm/mach-clps711x/board-edb7211.c | |||
@@ -109,13 +109,14 @@ static struct plat_lcd_data edb7211_lcd_power_pdata = { | |||
109 | 109 | ||
110 | static void edb7211_lcd_backlight_set_intensity(int intensity) | 110 | static void edb7211_lcd_backlight_set_intensity(int intensity) |
111 | { | 111 | { |
112 | gpio_set_value(EDB7211_LCDBL, intensity); | 112 | gpio_set_value(EDB7211_LCDBL, !!intensity); |
113 | clps_writel((clps_readl(PMPCON) & 0xf0ff) | (intensity << 8), PMPCON); | ||
113 | } | 114 | } |
114 | 115 | ||
115 | static struct generic_bl_info edb7211_lcd_backlight_pdata = { | 116 | static struct generic_bl_info edb7211_lcd_backlight_pdata = { |
116 | .name = "lcd-backlight.0", | 117 | .name = "lcd-backlight.0", |
117 | .default_intensity = 0x01, | 118 | .default_intensity = 0x01, |
118 | .max_intensity = 0x01, | 119 | .max_intensity = 0x0f, |
119 | .set_bl_intensity = edb7211_lcd_backlight_set_intensity, | 120 | .set_bl_intensity = edb7211_lcd_backlight_set_intensity, |
120 | }; | 121 | }; |
121 | 122 | ||