aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-pxa/magician.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index 7de3bfe543b4..9e126a901137 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -268,9 +268,18 @@ static void magician_set_bl_intensity(int intensity)
268 if (intensity) { 268 if (intensity) {
269 PWM_CTRL0 = 1; 269 PWM_CTRL0 = 1;
270 PWM_PERVAL0 = 0xc8; 270 PWM_PERVAL0 = 0xc8;
271 PWM_PWDUTY0 = intensity; 271 if (intensity > 0xc7) {
272 PWM_PWDUTY0 = intensity - 0x48;
273 gpio_set_value(EGPIO_MAGICIAN_BL_POWER2, 1);
274 } else {
275 PWM_PWDUTY0 = intensity;
276 gpio_set_value(EGPIO_MAGICIAN_BL_POWER2, 0);
277 }
278 gpio_set_value(EGPIO_MAGICIAN_BL_POWER, 1);
272 pxa_set_cken(CKEN_PWM0, 1); 279 pxa_set_cken(CKEN_PWM0, 1);
273 } else { 280 } else {
281 /* PWM_PWDUTY0 = intensity; */
282 gpio_set_value(EGPIO_MAGICIAN_BL_POWER, 0);
274 pxa_set_cken(CKEN_PWM0, 0); 283 pxa_set_cken(CKEN_PWM0, 0);
275 } 284 }
276} 285}
@@ -278,7 +287,7 @@ static void magician_set_bl_intensity(int intensity)
278static struct generic_bl_info backlight_info = { 287static struct generic_bl_info backlight_info = {
279 .default_intensity = 0x64, 288 .default_intensity = 0x64,
280 .limit_mask = 0x0b, 289 .limit_mask = 0x0b,
281 .max_intensity = 0xc7, 290 .max_intensity = 0xc7+0x48,
282 .set_bl_intensity = magician_set_bl_intensity, 291 .set_bl_intensity = magician_set_bl_intensity,
283}; 292};
284 293