patch-2.4.14 linux/include/asm-arm/keyboard.h

Next file: linux/include/asm-arm/proc-armv/cache.h
Previous file: linux/include/asm-arm/hardware/ep7212.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.13/linux/include/asm-arm/keyboard.h linux/include/asm-arm/keyboard.h
@@ -12,6 +12,9 @@
 #ifndef __ASM_ARM_KEYBOARD_H
 #define __ASM_ARM_KEYBOARD_H
 
+#include <linux/kd.h>
+#include <linux/pm.h>
+
 /*
  * We provide a unified keyboard interface when in VC_MEDIUMRAW
  * mode.  This means that all keycodes must be common between
@@ -21,13 +24,48 @@
  */
 #ifdef __KERNEL__
 
-#include <asm/arch/keyboard.h>
+extern int  (*k_setkeycode)(unsigned int, unsigned int);
+extern int  (*k_getkeycode)(unsigned int);
+extern int  (*k_translate)(unsigned char, unsigned char *, char);
+extern char (*k_unexpected_up)(unsigned char);
+extern void (*k_leds)(unsigned char);
+
+
+static inline int kbd_setkeycode(unsigned int sc, unsigned int kc)
+{
+	int ret = -EINVAL;
+
+	if (k_setkeycode)
+		ret = k_setkeycode(sc, kc);
+
+	return ret;
+}
 
-#ifndef kbd_rate
-struct kbd_repeat;
+static inline int kbd_getkeycode(unsigned int sc)
+{
+	int ret = -EINVAL;
 
-extern int kbd_rate(struct kbd_repeat *rate) __attribute__((weak));
-#endif
+	if (k_getkeycode)
+		ret = k_getkeycode(sc);
+
+	return ret;
+}
+
+static inline void kbd_leds(unsigned char leds)
+{
+	if (k_leds)
+		k_leds(leds);
+}
+
+extern int k_sysrq_key;
+extern unsigned char *k_sysrq_xlate;
+
+#define SYSRQ_KEY		k_sysrq_key
+#define kbd_sysrq_xlate		k_sysrq_xlate
+#define kbd_translate		k_translate
+#define kbd_unexpected_up	k_unexpected_up
+
+#include <asm/arch/keyboard.h>
 
 #endif /* __KERNEL__ */
 

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