disable IMQ on 2.6.28 as well -- people should use IFB..
[openwrt/openwrt.git] / target / linux / s3c24xx / patches / 0181-fix-pcf50633-platform-backlight-resume-ramp-setting.patch
1 From 63d42755b5ac2fca5d31b5a470470ac68a87b8a8 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Fri, 25 Jul 2008 23:06:15 +0100
4 Subject: [PATCH] fix-pcf50633-platform-backlight-resume-ramp-setting.patch
5
6 Signed-off-by: Andy Green <andy@openmoko.com>
7 ---
8 arch/arm/mach-s3c2440/mach-gta02.c | 1 +
9 drivers/i2c/chips/pcf50633.c | 6 ++++--
10 include/linux/pcf50633.h | 1 +
11 3 files changed, 6 insertions(+), 2 deletions(-)
12
13 diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
14 index 297b792..309e484 100644
15 --- a/arch/arm/mach-s3c2440/mach-gta02.c
16 +++ b/arch/arm/mach-s3c2440/mach-gta02.c
17 @@ -577,6 +577,7 @@ static struct pcf50633_platform_data gta02_pcf_pdata = {
18 },
19 },
20 .defer_resume_backlight = 1,
21 + .resume_backlight_ramp_speed = 5
22 };
23
24 #if 0 /* currently unused */
25 diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
26 index bbc8ae6..6745993 100644
27 --- a/drivers/i2c/chips/pcf50633.c
28 +++ b/drivers/i2c/chips/pcf50633.c
29 @@ -2476,10 +2476,12 @@ void pcf50633_backlight_resume(struct pcf50633_data *pcf)
30 {
31 dev_info(&pcf->client.dev, "pcf50633_backlight_resume\n");
32
33 - /* we force the backlight on in fact */
34 - reg_write(pcf, PCF50633_REG_LEDDIM, 1);
35 + /* platform defines resume ramp speed */
36 + reg_write(pcf, PCF50633_REG_LEDDIM,
37 + pcf->pdata->resume_backlight_ramp_speed);
38 reg_write(pcf, PCF50633_REG_LEDOUT, pcf->standby_regs.misc[
39 PCF50633_REG_LEDOUT - PCF50633_REG_AUTOOUT]);
40 + /* we force the backlight on in fact */
41 reg_write(pcf, PCF50633_REG_LEDENA, pcf->standby_regs.misc[
42 PCF50633_REG_LEDENA - PCF50633_REG_AUTOOUT] | 1);
43 }
44 diff --git a/include/linux/pcf50633.h b/include/linux/pcf50633.h
45 index fa1c7e8..b94b72a 100644
46 --- a/include/linux/pcf50633.h
47 +++ b/include/linux/pcf50633.h
48 @@ -173,6 +173,7 @@ struct pcf50633_platform_data {
49
50 /* post-resume backlight bringup */
51 int defer_resume_backlight;
52 + u8 resume_backlight_ramp_speed;
53 };
54
55 #endif /* _PCF50633_H */
56 --
57 1.5.6.3
58