lkml.org 
[lkml]   [2001]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: apm suspend broken ?
Hi Pascal,

On Wed, 31 Oct 2001 02:27:31 +0100 (CET) Pascal Lengard <pascal.lengard@wanadoo.fr> wrote:
>
> 2.4.10-pre11 ==> apm works
> 2.4.10-pre12 ==> apm broken

Can you try the following patch, please? This is the relevant part of a
patch that was applied to Alan Cox's kernels.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

--- 2.4.14-pre5/drivers/char/pc_keyb.c Mon Sep 24 05:12:49 2001
+++ 2.4.13-ac5/drivers/char/pc_keyb.c Tue Oct 30 17:42:28 2001
@@ -34,6 +34,7 @@
#include <linux/vt_kern.h>
#include <linux/smp_lock.h>
#include <linux/kd.h>
+#include <linux/pm.h>

#include <asm/keyboard.h>
#include <asm/bitops.h>
@@ -397,29 +398,32 @@
return 0200;
}

-void pckbd_pm_resume(void)
+int pckbd_pm_resume(struct pm_dev *dev, pm_request_t rqst, void *data)
{
#if defined CONFIG_PSMOUSE
unsigned long flags;

- if (queue) { /* Aux port detected */
- if (aux_count == 0) { /* Mouse not in use */
- spin_lock_irqsave(&kbd_controller_lock, flags);
- /*
- * Dell Lat. C600 A06 enables mouse after resume.
- * When user touches the pad, it posts IRQ 12
- * (which we do not process), thus holding keyboard.
- */
- kbd_write_command(KBD_CCMD_MOUSE_DISABLE);
- /* kbd_write_cmd(AUX_INTS_OFF); */ /* Config & lock */
- kb_wait();
- kbd_write_command(KBD_CCMD_WRITE_MODE);
- kb_wait();
- kbd_write_output(AUX_INTS_OFF);
- spin_unlock_irqrestore(&kbd_controller_lock, flags);
- }
+ if (rqst == PM_RESUME) {
+ if (queue) { /* Aux port detected */
+ if (aux_count == 0) { /* Mouse not in use */
+ spin_lock_irqsave(&kbd_controller_lock, flags);
+ /*
+ * Dell Lat. C600 A06 enables mouse after resume.
+ * When user touches the pad, it posts IRQ 12
+ * (which we do not process), thus holding keyboard.
+ */
+ kbd_write_command(KBD_CCMD_MOUSE_DISABLE);
+ /* kbd_write_cmd(AUX_INTS_OFF); */ /* Config & lock */
+ kb_wait();
+ kbd_write_command(KBD_CCMD_WRITE_MODE);
+ kb_wait();
+ kbd_write_output(AUX_INTS_OFF);
+ spin_unlock_irqrestore(&kbd_controller_lock, flags);
+ }
+ }
}
-#endif
+#endif
+ return 0;
}


--- 2.4.14-pre5/include/asm-i386/keyboard.h Wed Oct 24 22:05:26 2001
+++ 2.4.13-ac5/include/asm-i386/keyboard.h Tue Oct 30 17:42:41 2001
@@ -16,6 +16,7 @@
#include <linux/kernel.h>
#include <linux/ioport.h>
#include <linux/kd.h>
+#include <linux/pm.h>
#include <asm/io.h>

#define KEYBOARD_IRQ 1
@@ -28,7 +29,8 @@
extern char pckbd_unexpected_up(unsigned char keycode);
extern void pckbd_leds(unsigned char leds);
extern void pckbd_init_hw(void);
-extern void pckbd_pm_resume(void);
+extern int pckbd_pm_resume(struct pm_dev *, pm_request_t, void *);
+extern pm_callback pm_kbd_request_override;
extern unsigned char pckbd_sysrq_xlate[128];

#define kbd_setkeycode pckbd_setkeycode
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:18    [W:0.107 / U:2.276 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site