aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorPhilipp Zabel <philipp.zabel@gmail.com>2008-04-09 14:28:53 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-19 06:29:07 -0400
commit60802188ece1c5b63deefc05b7b442625e575476 (patch)
tree73086824194a93e590368ceb378001cf21764d13 /arch/arm/mach-pxa
parente07ff8d8091eff8e208fe1e406c15e5de0fffd63 (diff)
[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>
Diffstat (limited to 'arch/arm/mach-pxa')
-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