diff options
author | mokopatches <mokopatches@openmoko.org> | 2008-11-19 17:03:22 +0000 |
---|---|---|
committer | warmcat <andy@warmcat.com> | 2008-11-19 17:03:22 +0000 |
commit | fc1ca50030fea21a5cb1e40b49f9eb3e52fbb452 (patch) | |
tree | d62facd9a275f6f257393c567b2c0e3cf91b72d8 | |
parent | bef01cd3f1be75f9c0d2382910d1dcfe90b5cf0a (diff) |
suspend-prelim1.patch
-rw-r--r-- | drivers/i2c/chips/pcf50633.c | 5 | ||||
-rw-r--r-- | drivers/i2c/i2c-core.c | 13 | ||||
-rw-r--r-- | drivers/mfd/glamo/glamo-core.c | 2 |
3 files changed, 19 insertions, 1 deletions
diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c index fc1262e6ba4..e23c540d15d 100644 --- a/drivers/i2c/chips/pcf50633.c +++ b/drivers/i2c/chips/pcf50633.c @@ -1901,6 +1901,9 @@ static int pcf50633_suspend(struct device *dev, pm_message_t state) } } + /* turn off the backlight */ + __reg_write(pcf, PCF50633_REG_LEDENA, 0x00); + pcf->standby_regs.int1m = __reg_read(pcf, PCF50633_REG_INT1M); pcf->standby_regs.int2m = __reg_read(pcf, PCF50633_REG_INT2M); pcf->standby_regs.int3m = __reg_read(pcf, PCF50633_REG_INT3M); @@ -1925,6 +1928,8 @@ static int pcf50633_resume(struct device *dev) mutex_lock(&pcf->lock); + __reg_write(pcf, PCF50633_REG_LEDENA, 0x01); + /* Resume all saved registers that don't "survive" standby state */ __reg_write(pcf, PCF50633_REG_INT1M, pcf->standby_regs.int1m); __reg_write(pcf, PCF50633_REG_INT2M, pcf->standby_regs.int2m); diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 6f7c4d886ee..ceb473f6e29 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1,4 +1,3 @@ -/* i2c-core.c - a device driver for the iic-bus interface */ /* ------------------------------------------------------------------------- */ /* Copyright (C) 1995-99 Simon G. Vogl @@ -158,10 +157,16 @@ static int i2c_device_suspend(struct device * dev, pm_message_t mesg) if (!dev->driver) return 0; +#if 0 driver = to_i2c_driver(dev->driver); if (!driver->suspend) return 0; return driver->suspend(to_i2c_client(dev), mesg); +#else + if (!dev->driver->suspend) + return 0; + return dev->driver->suspend(dev, mesg); +#endif } static int i2c_device_resume(struct device * dev) @@ -170,10 +175,16 @@ static int i2c_device_resume(struct device * dev) if (!dev->driver) return 0; +#if 0 driver = to_i2c_driver(dev->driver); if (!driver->resume) return 0; return driver->resume(to_i2c_client(dev)); +#else + if (!dev->driver->resume) + return 0; + return dev->driver->resume(dev); +#endif } static void i2c_client_release(struct device *dev) diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c index 8497de281c1..ffa494583f5 100644 --- a/drivers/mfd/glamo/glamo-core.c +++ b/drivers/mfd/glamo/glamo-core.c @@ -1125,11 +1125,13 @@ static int glamo_remove(struct platform_device *pdev) #ifdef CONFIG_PM static int glamo_suspend(struct platform_device *pdev, pm_message_t state) { + glamo_power(glamo_handle, GLAMO_POWER_SUSPEND); return 0; } static int glamo_resume(struct platform_device *pdev) { + glamo_power(glamo_handle, GLAMO_POWER_ON); return 0; } #else |