[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ltib] anti-freeze imx27 pm patch
From: |
Peter Wurmsdobler |
Subject: |
Re: [Ltib] anti-freeze imx27 pm patch |
Date: |
Fri, 22 Feb 2008 15:33:26 +0000 |
User-agent: |
Thunderbird 2.0.0.9 (Windows/20071031) |
Hello Stuart,
the mx31 patch applied to the mx27 2007-12-19, the christmas release,
appears to be working. I have to test it more intensively, but for now I
could not make it freeze. The resulting patch is attached.
peter
diff --exclude CVS -uNr linux-2.6.22/drivers/input/keyboard/mxc_keyb.c
linux-2.6.22.modified/drivers/input/keyboard/mxc_keyb.c
--- linux-2.6.22/drivers/input/keyboard/mxc_keyb.c 2008-02-22
15:21:06.000000000 +0000
+++ linux-2.6.22.modified/drivers/input/keyboard/mxc_keyb.c 2008-02-22
15:14:01.000000000 +0000
@@ -622,6 +622,11 @@
*/
reg_val &= ~KBD_STAT_KDIE;
__raw_writew(reg_val, KPSR);
+#ifdef CONFIG_PM
+ } else if (reg_val & KBD_STAT_KPKR) {
+ reg_val &= ~KBD_STAT_KRIE;
+ __raw_writew(reg_val, KPSR);
+#endif
} else {
/* spurious interrupt */
return IRQ_RETVAL(0);
@@ -673,9 +678,16 @@
*/
static int mxc_kpp_suspend(struct platform_device *pdev, pm_message_t state)
{
+ unsigned short reg_val;
+
del_timer(&kpp_dev.poll_timer);
if (device_may_wakeup(&pdev->dev)) {
+ reg_val = __raw_readw(KPSR);
+ if ((reg_val & KBD_STAT_KDIE) == 0) {
+ reg_val |= KBD_STAT_KRIE;
+ __raw_writew(reg_val, KPSR);
+ }
enable_irq_wake(keypad->irq);
} else {
disable_irq(keypad->irq);