diff options
author | Andy Green <andy@openmoko.com> | 2008-11-19 17:09:43 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-19 17:09:43 +0000 |
commit | 433ad9e322020b611165198cf951ffb31160bb8e (patch) | |
tree | 2c9ec520cb45d818efd7fef714ea263e48dc7e98 /drivers/i2c/chips/pcf50633.c | |
parent | f2934eead77af67c0294989fbee252f3b41e3f82 (diff) |
fix-reduce-wake-reasons-in-pcf50633.patch
Currently we are willing to wake from sleep from
pcf50633 interrupts we don't actually do anything about
even when we wake (somewhat puzzled).
Let's disable some of these wake sources.
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/i2c/chips/pcf50633.c')
-rw-r--r-- | drivers/i2c/chips/pcf50633.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c index d2ff2c156e8..8ba81d24254 100644 --- a/drivers/i2c/chips/pcf50633.c +++ b/drivers/i2c/chips/pcf50633.c @@ -1935,23 +1935,7 @@ int pcf50633_report_resumers(struct pcf50633_data *pcf, char *buf) #ifdef CONFIG_PM -#define INT1M_RESUMERS (PCF50633_INT1_ADPINS | \ - PCF50633_INT1_ADPREM | \ - PCF50633_INT1_USBINS | \ - PCF50633_INT1_USBREM | \ - PCF50633_INT1_ALARM) -#define INT2M_RESUMERS (PCF50633_INT2_ONKEYF) -#define INT3M_RESUMERS (PCF50633_INT3_BATFULL | \ - PCF50633_INT3_CHGHALT | \ - PCF50633_INT3_THLIMON | \ - PCF50633_INT3_THLIMOFF | \ - PCF50633_INT3_USBLIMON | \ - PCF50633_INT3_USBLIMOFF | \ - PCF50633_INT3_ONKEY1S) -#define INT4M_RESUMERS (PCF50633_INT4_LOWSYS | \ - PCF50633_INT4_LOWBAT | \ - PCF50633_INT4_HIGHTMP) -#define INT5M_RESUMERS (0) + static int pcf50633_suspend(struct device *dev, pm_message_t state) { @@ -2010,11 +1994,11 @@ static int pcf50633_suspend(struct device *dev, pm_message_t state) pcf->standby_regs.int3m = __reg_read(pcf, PCF50633_REG_INT3M); pcf->standby_regs.int4m = __reg_read(pcf, PCF50633_REG_INT4M); pcf->standby_regs.int5m = __reg_read(pcf, PCF50633_REG_INT5M); - __reg_write(pcf, PCF50633_REG_INT1M, ~INT1M_RESUMERS & 0xff); - __reg_write(pcf, PCF50633_REG_INT2M, ~INT2M_RESUMERS & 0xff); - __reg_write(pcf, PCF50633_REG_INT3M, ~INT3M_RESUMERS & 0xff); - __reg_write(pcf, PCF50633_REG_INT4M, ~INT4M_RESUMERS & 0xff); - __reg_write(pcf, PCF50633_REG_INT5M, ~INT5M_RESUMERS & 0xff); + __reg_write(pcf, PCF50633_REG_INT1M, ~pcf->pdata->resumers[0]); + __reg_write(pcf, PCF50633_REG_INT2M, ~pcf->pdata->resumers[1]); + __reg_write(pcf, PCF50633_REG_INT3M, ~pcf->pdata->resumers[2]); + __reg_write(pcf, PCF50633_REG_INT4M, ~pcf->pdata->resumers[3]); + __reg_write(pcf, PCF50633_REG_INT5M, ~pcf->pdata->resumers[4]); pcf->have_been_suspended = 1; |