aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-19 17:09:51 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:09:51 +0000
commit2775b40e6679a921c5ecab729e021176fef56fb6 (patch)
treee7ffa7fa8ad88a5ca47876ea084439a972b47f7e
parent49a29fe542da56921c181955329a73478d1ec536 (diff)
fix-pcf50633-platform-backlight-resume-ramp-setting.patch
Signed-off-by: Andy Green <andy@openmoko.com>
-rw-r--r--arch/arm/mach-s3c2440/mach-gta02.c1
-rw-r--r--drivers/i2c/chips/pcf50633.c6
-rw-r--r--include/linux/pcf50633.h1
3 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index 297b792eec5..309e4848eb0 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -577,6 +577,7 @@ static struct pcf50633_platform_data gta02_pcf_pdata = {
},
},
.defer_resume_backlight = 1,
+ .resume_backlight_ramp_speed = 5
};
#if 0 /* currently unused */
diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
index bbc8ae6e745..67459935c3b 100644
--- a/drivers/i2c/chips/pcf50633.c
+++ b/drivers/i2c/chips/pcf50633.c
@@ -2476,10 +2476,12 @@ void pcf50633_backlight_resume(struct pcf50633_data *pcf)
{
dev_info(&pcf->client.dev, "pcf50633_backlight_resume\n");
- /* we force the backlight on in fact */
- reg_write(pcf, PCF50633_REG_LEDDIM, 1);
+ /* platform defines resume ramp speed */
+ reg_write(pcf, PCF50633_REG_LEDDIM,
+ pcf->pdata->resume_backlight_ramp_speed);
reg_write(pcf, PCF50633_REG_LEDOUT, pcf->standby_regs.misc[
PCF50633_REG_LEDOUT - PCF50633_REG_AUTOOUT]);
+ /* we force the backlight on in fact */
reg_write(pcf, PCF50633_REG_LEDENA, pcf->standby_regs.misc[
PCF50633_REG_LEDENA - PCF50633_REG_AUTOOUT] | 1);
}
diff --git a/include/linux/pcf50633.h b/include/linux/pcf50633.h
index fa1c7e86feb..b94b72a579f 100644
--- a/include/linux/pcf50633.h
+++ b/include/linux/pcf50633.h
@@ -173,6 +173,7 @@ struct pcf50633_platform_data {
/* post-resume backlight bringup */
int defer_resume_backlight;
+ u8 resume_backlight_ramp_speed;
};
#endif /* _PCF50633_H */