linux-openmoko-2.6.34: add slow resume fix #2337
authorMartin Jansa <Martin.Jansa@gmail.com>
Mon, 7 Jun 2010 22:20:20 +0000 (00:20 +0200)
committerMartin Jansa <Martin.Jansa@gmail.com>
Tue, 8 Jun 2010 06:52:20 +0000 (08:52 +0200)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
recipes/linux/linux-openmoko-2.6.34/pcf.patch [new file with mode: 0644]
recipes/linux/linux-openmoko-2.6.34_git.bb

diff --git a/recipes/linux/linux-openmoko-2.6.34/pcf.patch b/recipes/linux/linux-openmoko-2.6.34/pcf.patch
new file mode 100644 (file)
index 0000000..07256a3
--- /dev/null
@@ -0,0 +1,70 @@
+From 52a3e211599d22d03411549633869b9d3ea57d7e Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Mon, 7 Jun 2010 23:45:10 +0200
+Subject: [PATCH] pcf50633 fix suspend/resume (slow resume bug #2337)
+
+---
+ drivers/mfd/pcf50633-core.c |   28 ++++++++++++++++------------
+ drivers/mfd/pcf50633-irq.c  |    5 ++++-
+ 2 files changed, 20 insertions(+), 13 deletions(-)
+
+diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
+index 9c14dbf..84673a9 100644
+--- a/drivers/mfd/pcf50633-core.c
++++ b/drivers/mfd/pcf50633-core.c
+@@ -238,24 +237,30 @@ pcf50633_client_dev_register(struct pcf50633 *pcf, const char *name,
+ }
+ #ifdef CONFIG_PM
+-static int pcf50633_suspend(struct i2c_client *client, pm_message_t state)
++
++static int pcf50633_suspend(struct device *dev)
+ {
+-      struct pcf50633 *pcf;
+-      pcf = i2c_get_clientdata(client);
++      struct pcf50633 *pcf = dev_get_drvdata(dev);
+       return pcf50633_irq_suspend(pcf);
+ }
+-static int pcf50633_resume(struct i2c_client *client)
++static int pcf50633_resume(struct device *dev)
+ {
+-      struct pcf50633 *pcf;
+-      pcf = i2c_get_clientdata(client);
++      struct pcf50633 *pcf = dev_get_drvdata(dev);
+       return pcf50633_irq_resume(pcf);
+ }
++
++static const struct dev_pm_ops pcf50633_pm_ops = {
++      .suspend = pcf50633_suspend,
++      .resume = pcf50633_resume,
++};
++
++#define PCF50633_PM_OPS (&pcf50633_pm_ops)
++
+ #else
+-#define pcf50633_suspend NULL
+-#define pcf50633_resume NULL
++#define PCF50633_PM_OPS NULL
+ #endif
+ static int __devinit pcf50633_probe(struct i2c_client *client,
+@@ -372,12 +377,11 @@ static struct i2c_device_id pcf50633_id_table[] = {
+ static struct i2c_driver pcf50633_driver = {
+       .driver = {
+               .name   = "pcf50633",
++              .pm             = PCF50633_PM_OPS,
+       },
+       .id_table = pcf50633_id_table,
+       .probe = pcf50633_probe,
+       .remove = __devexit_p(pcf50633_remove),
+-      .suspend = pcf50633_suspend,
+-      .resume = pcf50633_resume,
+ };
+ static int __init pcf50633_init(void)
+-- 
+1.7.1
+
index d191e0b..1947b84 100644 (file)
@@ -3,8 +3,8 @@ require linux-openmoko.inc
 
 KERNEL_RELEASE="2.6.34"
 
-SRCREV = "dd1225cc08c3375bf80289ac1965c724881b149a"
-OEV = "oe3"
+SRCREV = "7d1467b5820a384e3e274ee051f44ff749c5ab71"
+OEV = "oe4"
 PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}"
 
 SRC_URI = "\
@@ -15,6 +15,7 @@ SRC_URI = "\
   file://touchscreen_ignoreunexpectedintr34.patch \
 # fix runtime issue when built with gcc-4.5
   file://use-noclone-attribute-for-naked.patch \
+  file://pcf.patch \
 # patches from Thomas White's gdrm-for-merging branch
   file://0001-DRM-for-platform-devices.patch \
   file://0002-Glamo-DRM-and-KMS-driver.patch \