Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[ARM] 4953/1: magician: add backlight power switching GPIOs

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Philipp Zabel and committed by
Russell King
60802188 e07ff8d8

+11 -2
+11 -2
arch/arm/mach-pxa/magician.c
··· 268 268 if (intensity) { 269 269 PWM_CTRL0 = 1; 270 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 279 pxa_set_cken(CKEN_PWM0, 1); 273 280 } else { 281 + /* PWM_PWDUTY0 = intensity; */ 282 + gpio_set_value(EGPIO_MAGICIAN_BL_POWER, 0); 274 283 pxa_set_cken(CKEN_PWM0, 0); 275 284 } 276 285 } ··· 287 278 static struct generic_bl_info backlight_info = { 288 279 .default_intensity = 0x64, 289 280 .limit_mask = 0x0b, 290 - .max_intensity = 0xc7, 281 + .max_intensity = 0xc7+0x48, 291 282 .set_bl_intensity = magician_set_bl_intensity, 292 283 }; 293 284