summaryrefslogtreecommitdiff
path: root/target/linux/s3c24xx/patches-2.6.26/0179-fix-pcf50633-really-defer-backlight-on-resume.patch.patch
diff options
context:
space:
mode:
authorMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
committerMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
commit614683faf8029100802db06a825648d0b6490285 (patch)
tree7401b135dc7ce24ff0175e67e0f2ce7f96296ff0 /target/linux/s3c24xx/patches-2.6.26/0179-fix-pcf50633-really-defer-backlight-on-resume.patch.patch
parent4a018d2445c5f249179ff82c8fffb0e3b717f738 (diff)
downloadmtk-20170518-614683faf8029100802db06a825648d0b6490285.zip
mtk-20170518-614683faf8029100802db06a825648d0b6490285.tar.gz
mtk-20170518-614683faf8029100802db06a825648d0b6490285.tar.bz2
changed Makefile and profiles, added patches for kernel 2.6.24 (stable-branch of Openmoko)
SVN-Revision: 13613
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.26/0179-fix-pcf50633-really-defer-backlight-on-resume.patch.patch')
-rwxr-xr-xtarget/linux/s3c24xx/patches-2.6.26/0179-fix-pcf50633-really-defer-backlight-on-resume.patch.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.26/0179-fix-pcf50633-really-defer-backlight-on-resume.patch.patch b/target/linux/s3c24xx/patches-2.6.26/0179-fix-pcf50633-really-defer-backlight-on-resume.patch.patch
new file mode 100755
index 0000000..6c17c69
--- /dev/null
+++ b/target/linux/s3c24xx/patches-2.6.26/0179-fix-pcf50633-really-defer-backlight-on-resume.patch.patch
@@ -0,0 +1,71 @@
+From 568981c881e20fccdbfffb073c3868dcdc012446 Mon Sep 17 00:00:00 2001
+From: Andy Green <andy@openmoko.com>
+Date: Fri, 25 Jul 2008 23:06:15 +0100
+Subject: [PATCH] fix-pcf50633-really-defer-backlight-on-resume.patch
+
+Backlight wasn't off by default on resume, so it was never really
+deferred (until LCM is initialized). This fixes that and so removes
+the brief white screen between pcf50633 resume and LCM init.
+
+Signed-off-by: Andy Green <andy@openmoko.com>
+---
+ drivers/i2c/chips/pcf50633.c | 23 +++++++++++++++++------
+ 1 files changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
+index 33c4ef4..bbc8ae6 100644
+--- a/drivers/i2c/chips/pcf50633.c
++++ b/drivers/i2c/chips/pcf50633.c
+@@ -2474,13 +2474,14 @@ EXPORT_SYMBOL_GPL(pcf50633_ready);
+
+ 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_LEDOUT, pcf->standby_regs.misc[
++ reg_write(pcf, PCF50633_REG_LEDDIM, 1);
++ reg_write(pcf, PCF50633_REG_LEDOUT, pcf->standby_regs.misc[
+ PCF50633_REG_LEDOUT - PCF50633_REG_AUTOOUT]);
+- __reg_write(pcf, PCF50633_REG_LEDENA, pcf->standby_regs.misc[
++ reg_write(pcf, PCF50633_REG_LEDENA, pcf->standby_regs.misc[
+ PCF50633_REG_LEDENA - PCF50633_REG_AUTOOUT] | 1);
+- __reg_write(pcf, PCF50633_REG_LEDDIM, pcf->standby_regs.misc[
+- PCF50633_REG_LEDDIM - PCF50633_REG_AUTOOUT]);
+ }
+ EXPORT_SYMBOL_GPL(pcf50633_backlight_resume);
+
+@@ -2491,6 +2492,7 @@ static int pcf50633_resume(struct device *dev)
+ struct pcf50633_data *pcf = i2c_get_clientdata(client);
+ int ret;
+ u8 res[5];
++ u8 misc[PCF50633_REG_LEDDIM - PCF50633_REG_AUTOOUT + 1];
+
+ dev_info(dev, "pcf50633_resume suspended on entry = %d\n",
+ (int)pcf->suspend_state);
+@@ -2502,11 +2504,20 @@ static int pcf50633_resume(struct device *dev)
+
+ __reg_write(pcf, PCF50633_REG_OOCTIM2, pcf->standby_regs.ooctim2);
+
++ memcpy(misc, pcf->standby_regs.misc, sizeof(pcf->standby_regs.misc));
++
++ if (pcf->pdata->defer_resume_backlight) {
++ misc[PCF50633_REG_LEDOUT - PCF50633_REG_AUTOOUT] = 1;
++ misc[PCF50633_REG_LEDENA - PCF50633_REG_AUTOOUT] = 0x20;
++ misc[PCF50633_REG_LEDCTL - PCF50633_REG_AUTOOUT] = 1;
++ misc[PCF50633_REG_LEDDIM - PCF50633_REG_AUTOOUT] = 1;
++ }
++
+ /* regulator voltages and enable states */
+ ret = i2c_smbus_write_i2c_block_data(&pcf->client,
+ PCF50633_REG_AUTOOUT,
+- sizeof(pcf->standby_regs.misc) - 4,
+- &pcf->standby_regs.misc[0]);
++ sizeof(misc),
++ &misc[0]);
+ if (ret)
+ dev_err(dev, "Failed to restore misc :-( %d\n", ret);
+
+--
+1.5.6.3
+