Patchwork [rfc,qemu,2/4] wakeup: make ps/2 configurable

login
register
mail settings
Submitter Gerd Hoffmann
Date July 17, 2012, 12:30 p.m.
Message ID <1342528252-11470-3-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/171416/
State New
Headers show

Comments

Gerd Hoffmann - July 17, 2012, 12:30 p.m.
ps/2 gets gpe bits 0x08 (keyboard) and 0x09 (mouse).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/ps2.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/ps2.c b/hw/ps2.c
index f93cd24..a3cd124 100644
--- a/hw/ps2.c
+++ b/hw/ps2.c
@@ -155,7 +155,7 @@  static void ps2_put_keycode(void *opaque, int keycode)
 {
     PS2KbdState *s = opaque;
 
-    qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
+    qemu_system_wakeup_request(QEMU_WAKEUP_REASON_GPE_8);
     /* XXX: add support for scancode set 1 */
     if (!s->translate && keycode < 0xe0 && s->scancode_set > 1) {
         if (keycode & 0x80) {
@@ -371,7 +371,7 @@  static void ps2_mouse_event(void *opaque,
     s->mouse_buttons = buttons_state;
 
     if (buttons_state) {
-        qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
+        qemu_system_wakeup_request(QEMU_WAKEUP_REASON_GPE_9);
     }
 
     if (!(s->mouse_status & MOUSE_STATUS_REMOTE) &&