OSDN Git Service

[PATCH] Reintroduction i386 CONFIG_DUMMY_KEYB option
authorNick Warne <nick@linicks.net>
Mon, 28 Nov 2005 05:49:58 +0000 (06:49 +0100)
committerMarcelo Tosatti <marcelo@pegasos.cnet>
Mon, 28 Nov 2005 11:37:16 +0000 (05:37 -0600)
This re-activates an option making it possible to replace the PS2
keyboard driver by a dummy one still compatible with CONFIG_VT. The code
has been in the kernel for a long time, only the option was hidden ! It
also has an equivalent in 2.6.

Patch from Nick Warne <nick@linicks.net>
Signed-off-by: Willy Tarreau <willy@w.ods.org>
Documentation/Configure.help
arch/i386/kernel/dmi_scan.c
drivers/char/dummy_keyb.c
drivers/input/Config.in
kernel/panic.c

index 57c39a7..a54a4c2 100644 (file)
@@ -15240,6 +15240,24 @@ CONFIG_INPUT_JOYDEV
   The module will be called joydev.o. If you want to compile it as a
   module, say M here and read <file:Documentation/modules.txt>.
 
+Dummy keyboard driver
+CONFIG_DUMMY_KEYB
+  What is this for?
+
+  Not all systems have keyboards.  Some don't even have a keyboard
+  port.  However, some of those systems have video support and can
+  use the virtual terminal support for display.  However, the virtual
+  terminal code expects a keyboard of some kind.  This driver keeps
+  the virtual terminal code happy by providing it a "keyboard", albeit
+  a very quiet one.
+
+  If you want to use the virtual terminal support but your system
+  does not support a keyboard, define CONFIG_DUMMY_KEYB along with
+  CONFIG_VT.
+
+  This can also be selected lonesome without any VT support (i.e. no
+  monitor or keyboard attached) - just define CONFIG_DUMMY_KEYB.
+
 Event interface support
 CONFIG_INPUT_EVDEV
   Say Y here if you want your USB or ADB HID device events be
index 92b4126..659e32f 100644 (file)
@@ -411,7 +411,7 @@ typedef void (pm_kbd_func) (void);
 
 static __init int broken_ps2_resume(struct dmi_blacklist *d)
 {
-#ifdef CONFIG_VT
+#if defined(CONFIG_VT) && !defined(CONFIG_DUMMY_KEYB)
        if (pm_kbd_request_override == NULL)
        {
                pm_kbd_request_override = pckbd_pm_resume;
index f2b3582..a80d1a0 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/input.h>
+#include <asm/keyboard.h>
 
 void kbd_leds(unsigned char leds)
 {
index 5353414..56fd537 100644 (file)
@@ -7,6 +7,11 @@ comment 'Input core support'
 
 tristate 'Input core support' CONFIG_INPUT
 dep_tristate '  Keyboard support' CONFIG_INPUT_KEYBDEV $CONFIG_INPUT
+
+if [ "$CONFIG_INPUT_KEYBDEV" == "n" ]; then
+       bool '  Use dummy keyboard driver' CONFIG_DUMMY_KEYB $CONFIG_INPUT
+fi
+
 dep_tristate '  Mouse support' CONFIG_INPUT_MOUSEDEV $CONFIG_INPUT
 if [ "$CONFIG_INPUT_MOUSEDEV" != "n" ]; then
    int '   Horizontal screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
index 7b38771..4c611d8 100644 (file)
@@ -104,7 +104,7 @@ NORET_TYPE void panic(const char * fmt, ...)
 #endif
        sti();
        for(;;) {
-#if defined(CONFIG_X86) && defined(CONFIG_VT) 
+#if defined(CONFIG_X86) && defined(CONFIG_VT) && !defined(CONFIG_DUMMY_KEYB) 
                extern void panic_blink(void);
                panic_blink(); 
 #endif