patch-2.4.10 linux/drivers/input/keybdev.c

Next file: linux/drivers/input/mousedev.c
Previous file: linux/drivers/input/input.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/drivers/input/keybdev.c linux/drivers/input/keybdev.c
@@ -39,7 +39,8 @@
 
 #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(__alpha__) || \
     defined(__mips__) || defined(CONFIG_SPARC64) || defined(CONFIG_SUPERH) || \
-    defined(CONFIG_PPC) || defined(__mc68000__)
+    defined(CONFIG_PPC) || defined(__mc68000__) || defined(__hppa__) || \
+    defined(__arm__)
 
 static int x86_sysrq_alt = 0;
 #ifdef CONFIG_SPARC64
@@ -47,6 +48,8 @@
 extern void batten_down_hatches(void);
 #endif
 
+static int jp_kbd_109 = 1;	/* Yes, .jp is the default. See 51142. */
+
 static unsigned short x86_keycodes[256] =
 	{ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
 	 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
@@ -197,14 +200,14 @@
 
 	input_open_device(handle);
 
-	printk(KERN_INFO "keybdev.c: Adding keyboard: input%d\n", dev->number);
+//	printk(KERN_INFO "keybdev.c: Adding keyboard: input%d\n", dev->number);
 
 	return handle;
 }
 
 static void keybdev_disconnect(struct input_handle *handle)
 {
-	printk(KERN_INFO "keybdev.c: Removing keyboard: input%d\n", handle->dev->number);
+//	printk(KERN_INFO "keybdev.c: Removing keyboard: input%d\n", handle->dev->number);
 	input_close_device(handle);
 	kfree(handle);
 }
@@ -219,6 +222,15 @@
 {
 	input_register_handler(&keybdev_handler);
 	kbd_ledfunc = keybdev_ledfunc;
+
+	if (jp_kbd_109) {
+		x86_keycodes[0xb5] = 0x73;	/* backslash, underscore */
+		x86_keycodes[0xb6] = 0x70;
+		x86_keycodes[0xb7] = 0x7d;	/* Yen, pipe */
+		x86_keycodes[0xb8] = 0x79;
+		x86_keycodes[0xb9] = 0x7b;
+	}
+
 	return 0;
 }
 
@@ -233,3 +245,4 @@
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
 MODULE_DESCRIPTION("Input driver to keyboard driver binding");
+MODULE_PARM(jp_kbd_109, "i");

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)