diff options
author | Balaji Rao <balajirrao@openmoko.org> | 2008-11-20 19:46:51 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-20 19:46:51 +0000 |
commit | 7e8fd667d1f857fdd7e3b5511869933a72388564 (patch) | |
tree | 5c592c6117a95b98a5287c843c226ddd76fc7293 | |
parent | 1df2598dfebdd1df5bb81c5c8d52fb311c49a7bb (diff) |
pcf50633-remove-unnecessary-state-save-during-suspend.patch
We don't need to save state when we suspend as we don't put the PMU to
standby.
This improves the 'resume devices' time from 1.175s to 1.135 sec!
-rw-r--r-- | drivers/i2c/chips/pcf50633.c | 39 | ||||
-rw-r--r-- | include/linux/pcf50633.h | 14 |
2 files changed, 0 insertions, 53 deletions
diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c index 60b8b1d2764..c2139ba3097 100644 --- a/drivers/i2c/chips/pcf50633.c +++ b/drivers/i2c/chips/pcf50633.c @@ -1966,23 +1966,6 @@ static int pcf50633_suspend(struct device *dev, pm_message_t state) disable_irq(pcf->irq); - /* Save all registers that don't "survive" standby state */ - pcf->standby_regs.ooctim2 = __reg_read(pcf, PCF50633_REG_OOCTIM2); - - ret = i2c_smbus_read_i2c_block_data(pcf->client, - PCF50633_REG_AUTOOUT, - sizeof(pcf->standby_regs.misc), - &pcf->standby_regs.misc[0]); - if (ret != sizeof(pcf->standby_regs.misc)) - dev_err(dev, "Failed to save misc levels and enables :-(\n"); - - /* regulator voltages and enable states */ - ret = i2c_smbus_read_i2c_block_data(pcf->client, - PCF50633_REG_LDO1OUT, - sizeof(pcf->standby_regs.ldo), - &pcf->standby_regs.ldo[0]); - if (ret != sizeof(pcf->standby_regs.ldo)) - dev_err(dev, "Failed to save LDO levels and enables :-(\n"); /* set interrupt masks so only those sources we want to wake * us are able to */ @@ -2055,28 +2038,6 @@ static int pcf50633_resume(struct device *dev) pcf->suspend_state = PCF50633_SS_STARTING_RESUME; - /* these guys get reset while pcf50633 is suspend state, refresh */ - - __reg_write(pcf, PCF50633_REG_OOCTIM2, pcf->standby_regs.ooctim2); - - memcpy(misc, pcf->standby_regs.misc, sizeof(pcf->standby_regs.misc)); - - /* regulator voltages and enable states */ - ret = i2c_smbus_write_i2c_block_data(pcf->client, - PCF50633_REG_AUTOOUT, - sizeof(misc), - &misc[0]); - if (ret) - dev_err(dev, "Failed to restore misc :-( %d\n", ret); - - /* regulator voltages and enable states */ - ret = i2c_smbus_write_i2c_block_data(pcf->client, - PCF50633_REG_LDO1OUT, - sizeof(pcf->standby_regs.ldo), - &pcf->standby_regs.ldo[0]); - if (ret) - dev_err(dev, "Failed to restore LDOs :-( %d\n", ret); - memset(res, 0, sizeof(res)); /* not interested in second on resume */ res[0] = PCF50633_INT1_SECOND; diff --git a/include/linux/pcf50633.h b/include/linux/pcf50633.h index ed14350116d..45c9adb4053 100644 --- a/include/linux/pcf50633.h +++ b/include/linux/pcf50633.h @@ -578,20 +578,6 @@ struct pcf50633_data { int adc_queue_tail; /* tail owned by service code */ struct platform_device *regulator_pdev[__NUM_PCF50633_REGULATORS]; - -#ifdef CONFIG_PM - struct { - u_int8_t ooctim2; - /* enables are always [1] below - * I2C has limit of 32 sequential regs, so done in two lumps - * because it covers 33 register extent otherwise - */ - u_int8_t misc[PCF50633_REG_LEDDIM - PCF50633_REG_AUTOOUT + 1]; - /* skip 1 reserved reg here */ - u_int8_t ldo[PCF50633_REG_HCLDOENA - PCF50633_REG_LDO1OUT + 1]; - } standby_regs; - -#endif }; /* this is to be provided by the board implementation */ |