[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ltib] anti-freeze imx27 pm patch
From: |
Peter Wurmsdobler |
Subject: |
[Ltib] anti-freeze imx27 pm patch |
Date: |
Fri, 22 Feb 2008 11:05:25 +0000 |
User-agent: |
Thunderbird 2.0.0.9 (Windows/20071031) |
Hello,
In a previous post I mentioned that a imx27 ads loaded with the bsp
release from 22 may 2007 freezes if a key is pressed while the system is
in the suspend process (or resume which cannot be told). Freescale were
so nice and provided a fix for this problem for the imx31, attached.
Unfortunately, this patch cannot be applied to the imx27 kernel source
file mxc_keyb.c, because the patch assumes an already implemented
mxc_kpp_suspend() function which might be the case for a mx31, but is
not for the mx27.
Well, I could download the mx31 bsp, install it, extract the kernel,
etc, but would somebody simply have a mxc_keyb.c file to which I can
savely apply the pach and add the new implementation of the two
functions to the imx27 source tree. Afterwards I will be able to create
a mx27 patch.
Regards,
peter
--
/drivers/input/keyboard/mxc_keyb.c
@@ -622,6 +622,16 @@ static irqreturn_t mxc_kpp_interrupt(int irq, void
*dev_id)
*/
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 +683,17 @@ static void mxc_kpp_close(struct input_dev *dev)
*/
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);
- [Ltib] anti-freeze imx27 pm patch,
Peter Wurmsdobler <=