[ar71xx] register WMAC device on the Netgear WNR2000 board
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 1157-The-following-is-a-minor-cleanup-of-backlight-resume.patch
1 From eb0d4f1481de79a63f4a630bb874d3234a6ce13b Mon Sep 17 00:00:00 2001
2 From: Sean McNeil <sean@mcneil.com>
3 Date: Fri, 25 Jul 2008 23:06:11 +0100
4 Subject: [PATCH] The following is a minor cleanup of backlight resume:
5
6 ---
7 drivers/i2c/chips/pcf50633.c | 12 ++++--------
8 1 files changed, 4 insertions(+), 8 deletions(-)
9
10 diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
11 index e5ffeff..f6886d7 100644
12 --- a/drivers/i2c/chips/pcf50633.c
13 +++ b/drivers/i2c/chips/pcf50633.c
14 @@ -2228,8 +2228,9 @@ static int pcf50633_suspend(struct device *dev, pm_message_t state)
15
16 void pcf50633_backlight_resume(struct pcf50633_data *pcf)
17 {
18 + /* we force the backlight on in fact */
19 __reg_write(pcf, PCF50633_REG_LEDOUT, pcf->standby_regs.ledout);
20 - __reg_write(pcf, PCF50633_REG_LEDENA, pcf->standby_regs.ledena);
21 + __reg_write(pcf, PCF50633_REG_LEDENA, pcf->standby_regs.ledena | 0x01);
22 __reg_write(pcf, PCF50633_REG_LEDDIM, pcf->standby_regs.leddim);
23 }
24 EXPORT_SYMBOL_GPL(pcf50633_backlight_resume);
25 @@ -2243,8 +2244,6 @@ static int pcf50633_resume(struct device *dev)
26
27 mutex_lock(&pcf->lock);
28
29 - __reg_write(pcf, PCF50633_REG_LEDENA, 0x01);
30 -
31 /* Resume all saved registers that don't "survive" standby state */
32 __reg_write(pcf, PCF50633_REG_INT1M, pcf->standby_regs.int1m);
33 __reg_write(pcf, PCF50633_REG_INT2M, pcf->standby_regs.int2m);
34 @@ -2263,11 +2262,8 @@ static int pcf50633_resume(struct device *dev)
35 __reg_write(pcf, PCF50633_REG_MEMLDOENA, pcf->standby_regs.memldoena);
36
37 /* platform can choose to defer backlight bringup */
38 - if (!pcf->pdata->defer_resume_backlight) {
39 - __reg_write(pcf, PCF50633_REG_LEDOUT, pcf->standby_regs.ledout);
40 - __reg_write(pcf, PCF50633_REG_LEDENA, pcf->standby_regs.ledena);
41 - __reg_write(pcf, PCF50633_REG_LEDDIM, pcf->standby_regs.leddim);
42 - }
43 + if (!pcf->pdata->defer_resume_backlight)
44 + pcf50633_backlight_resume(pcf);
45
46 /* FIXME: one big read? */
47 for (i = 0; i < 7; i++) {
48 --
49 1.5.6.3
50
This page took 0.040526 seconds and 5 git commands to generate.