summaryrefslogtreecommitdiff
path: root/packages/linux/linux-gumstix-2.6.15/i2c-gpl-module-fix.patch
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2006-04-28 19:06:59 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-04-28 19:06:59 +0000
commit989a3c578011cad60fc167cdb1b9a0e603f43072 (patch)
treeaef515b13e77cda22b30d75295f3aaef16d6c470 /packages/linux/linux-gumstix-2.6.15/i2c-gpl-module-fix.patch
parentd775757b77aba05c2766546682db2915b5cc12e1 (diff)
* add initial support for gumstix (xscale pxa255) platform (gumstix.com)
* add GMUstix distro for gumstix (GMU = George Mason University) * add linux-gumstix-2.6.15 with gumstix patchset * close bug #861
Diffstat (limited to 'packages/linux/linux-gumstix-2.6.15/i2c-gpl-module-fix.patch')
-rw-r--r--packages/linux/linux-gumstix-2.6.15/i2c-gpl-module-fix.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/packages/linux/linux-gumstix-2.6.15/i2c-gpl-module-fix.patch b/packages/linux/linux-gumstix-2.6.15/i2c-gpl-module-fix.patch
new file mode 100644
index 0000000000..408bb1854d
--- /dev/null
+++ b/packages/linux/linux-gumstix-2.6.15/i2c-gpl-module-fix.patch
@@ -0,0 +1,43 @@
+Index: linux-2.6.15gum/drivers/i2c/busses/i2c-pxa.c
+===================================================================
+--- linux-2.6.15gum.orig/drivers/i2c/busses/i2c-pxa.c
++++ linux-2.6.15gum/drivers/i2c/busses/i2c-pxa.c
+@@ -32,7 +32,6 @@
+ #include <linux/i2c-pxa.h>
+ #include <linux/platform_device.h>
+
+-#include <asm/arch/pxa-regs.h>
+ #include <asm/hardware.h>
+ #include <asm/irq.h>
+ #include <asm/arch/i2c.h>
+@@ -900,6 +899,12 @@ static int i2c_pxa_xfer(struct i2c_adapt
+ struct pxa_i2c *i2c = adap->algo_data;
+ int ret, i;
+
++ /* If the I2C controller is disabled we need to reset it (probably due
++ to a suspend/resume destroying state). We do this here as we can then
++ avoid worrying about resuming the controller before its users. */
++ if (!(ICR & ICR_IUE))
++ i2c_pxa_reset(i2c);
++
+ for (i = adap->retries; i >= 0; i--) {
+ ret = i2c_pxa_do_xfer(i2c, msgs, num);
+ if (ret != I2C_RETRY)
+@@ -940,7 +945,9 @@ static struct pxa_i2c i2c_pxa = {
+ static int i2c_pxa_probe(struct platform_device *dev)
+ {
+ struct pxa_i2c *i2c = &i2c_pxa;
++#ifdef CONFIG_I2C_PXA_SLAVE
+ struct i2c_pxa_platform_data *plat = dev->dev.platform_data;
++#endif
+ int ret;
+
+ #ifdef CONFIG_PXA27x
+@@ -1025,5 +1032,7 @@ static void i2c_adap_pxa_exit(void)
+ return platform_driver_unregister(&i2c_pxa_driver);
+ }
+
++MODULE_LICENSE("GPL");
++
+ module_init(i2c_adap_pxa_init);
+ module_exit(i2c_adap_pxa_exit);