patch-2.4.0-test12 linux/arch/parisc/kernel/keyboard.c
Next file: linux/arch/parisc/kernel/lasimap.map
Previous file: linux/arch/parisc/kernel/irq.c
Back to the patch index
Back to the overall index
- Lines: 83
- Date:
Tue Dec 5 12:29:39 2000
- Orig file:
v2.4.0-test11/linux/arch/parisc/kernel/keyboard.c
- Orig date:
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.4.0-test11/linux/arch/parisc/kernel/keyboard.c linux/arch/parisc/kernel/keyboard.c
@@ -0,0 +1,82 @@
+/*
+ * linux/arch/parisc/kernel/keyboard.c
+ *
+ * Alex deVries <adevries@thepuffingroup.com>
+ * Copyright (1999) The Puffin Group
+ * Mostly rewritten by Philipp Rumpf <prumpf@tux.org>
+ * Copyright 2000 Philipp Rumpf
+ */
+
+#include <linux/keyboard.h>
+#include <asm/keyboard.h>
+
+static int def_setkeycode(unsigned int x, unsigned int y)
+{
+ return 0;
+}
+
+static int def_getkeycode(unsigned int x)
+{
+ return 0;
+}
+
+static int def_translate(unsigned char scancode, unsigned char *keycode,
+ char raw)
+{
+ *keycode = scancode;
+
+ return 1;
+}
+
+static char def_unexpected_up(unsigned char c)
+{
+ return 128;
+}
+
+static void def_leds(unsigned char leds)
+{
+}
+
+static void def_init_hw(void)
+{
+}
+
+static char def_sysrq_xlate[NR_KEYS];
+
+static struct kbd_ops def_kbd_ops = {
+ setkeycode: def_setkeycode,
+ getkeycode: def_getkeycode,
+ translate: def_translate,
+ unexpected_up: def_unexpected_up,
+ leds: def_leds,
+ init_hw: def_init_hw,
+
+ sysrq_key: 0xff,
+ sysrq_xlate: def_sysrq_xlate,
+};
+
+struct kbd_ops *kbd_ops = &def_kbd_ops;
+
+void register_kbd_ops(struct kbd_ops *ops)
+{
+ if(ops->setkeycode)
+ kbd_ops->setkeycode = ops->setkeycode;
+
+ if(ops->getkeycode)
+ kbd_ops->getkeycode = ops->getkeycode;
+
+ if(ops->translate)
+ kbd_ops->translate = ops->translate;
+
+ if(ops->unexpected_up)
+ kbd_ops->unexpected_up = ops->unexpected_up;
+
+ if(ops->leds)
+ kbd_ops->leds = ops->leds;
+
+ if(ops->init_hw)
+ kbd_ops->init_hw = ops->init_hw;
+
+ kbd_ops->sysrq_key = ops->sysrq_key;
+ kbd_ops->sysrq_xlate = ops->sysrq_xlate;
+}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)