diff options
author | Philipp Zabel <philipp.zabel@gmail.com> | 2008-04-09 20:28:53 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-19 12:29:07 +0200 |
commit | 60802188ece1c5b63deefc05b7b442625e575476 (patch) | |
tree | 73086824194a93e590368ceb378001cf21764d13 /arch/arm/mach-pxa/magician.c | |
parent | [ARM] 4952/1: magician: add LCD detection, LCD power switching, update pxafb ... (diff) | |
download | linux-60802188ece1c5b63deefc05b7b442625e575476.tar.xz linux-60802188ece1c5b63deefc05b7b442625e575476.zip |
[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 '')
-rw-r--r-- | arch/arm/mach-pxa/magician.c | 13 |
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) if (intensity) { PWM_CTRL0 = 1; PWM_PERVAL0 = 0xc8; - PWM_PWDUTY0 = intensity; + if (intensity > 0xc7) { + PWM_PWDUTY0 = intensity - 0x48; + gpio_set_value(EGPIO_MAGICIAN_BL_POWER2, 1); + } else { + PWM_PWDUTY0 = intensity; + gpio_set_value(EGPIO_MAGICIAN_BL_POWER2, 0); + } + gpio_set_value(EGPIO_MAGICIAN_BL_POWER, 1); pxa_set_cken(CKEN_PWM0, 1); } else { + /* PWM_PWDUTY0 = intensity; */ + gpio_set_value(EGPIO_MAGICIAN_BL_POWER, 0); pxa_set_cken(CKEN_PWM0, 0); } } @@ -278,7 +287,7 @@ static void magician_set_bl_intensity(int intensity) static struct generic_bl_info backlight_info = { .default_intensity = 0x64, .limit_mask = 0x0b, - .max_intensity = 0xc7, + .max_intensity = 0xc7+0x48, .set_bl_intensity = magician_set_bl_intensity, }; |