patch-2.3.99-pre4 linux/include/asm-arm/arch-sa1100/keyboard.h

Next file: linux/include/asm-arm/arch-sa1100/system.h
Previous file: linux/include/asm-arm/arch-sa1100/hardware.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre3/linux/include/asm-arm/arch-sa1100/keyboard.h linux/include/asm-arm/arch-sa1100/keyboard.h
@@ -1,27 +1,51 @@
 /*
- * linux/include/asm-arm/arch-sa1100/keyboard.h
- *
- * Keyboard driver definitions for SA1100 architecture
- *
- * This really has to be cleaned up somehow...
- * 
+ *  linux/include/asm-arm/arch-sa1100/keyboard.h
+ *  Created 16 Dec 1999 by Nicolas Pitre <nico@cam.org>
+ *  This file contains the SA1100 architecture specific keyboard definitions
  */
 
-#define KEYBOARD_IRQ 
+#ifndef _SA1100_KEYBOARD_H
+#define _SA1100_KEYBOARD_H
 
-#define NR_SCANCODES 128
+#include <linux/config.h>
 
-#define kbd_setkeycode(sc,kc)  (-EINVAL)
-#define kbd_getkeycode(sc)     (-EINVAL)
-#define kbd_pretranslate(sc,kc)       1
-#define kbd_translate(sc, kcp, raw)   kbd_drv_translate(sc, kcp, raw)
-#define kbd_init_hw()	kbd_drv_init()
-#define kbd_unexpected_up		
 
-#define kbd_leds(leds)	
+#ifdef CONFIG_SA1100_BRUTUS
 
-#define kbd_sysrq_xlate			
-#define kbd_disable_irq()
-#define kbd_enable_irq()
+extern int Brutus_kbd_translate(unsigned char scancode, unsigned char *keycode,
+			   char raw_mode);
+extern void Brutus_kbd_leds(unsigned char leds);
+extern void Brutus_kbd_init_hw(void);
+extern void Brutus_kbd_enable_irq(void);
+extern void Brutus_kbd_disable_irq(void);
+extern unsigned char Brutus_kbd_sysrq_xlate[128];
+
+#define kbd_setkeycode(x...)	(-ENOSYS)
+#define kbd_getkeycode(x...)	(-ENOSYS)
+#define kbd_translate		Brutus_kbd_translate
+#define kbd_unexpected_up(x...)	(1)
+#define kbd_leds		Brutus_kbd_leds
+#define kbd_init_hw		Brutus_kbd_init_hw
+#define kbd_enable_irq		Brutus_kbd_enable_irq
+#define kbd_disable_irq		Brutus_kbd_disable_irq
+#define kbd_sysrq_xlate		Brutus_kbd_sysrq_xlate
+
+#define SYSRQ_KEY 0x54
+
+#else
+
+/* dummy i.e. no real keyboard */
+#define kbd_setkeycode(x...)	(-ENOSYS)
+#define kbd_getkeycode(x...)	(-ENOSYS)
+#define kbd_translate(x...)	(0)
+#define kbd_unexpected_up(x...)	(1)
+#define kbd_leds(x...)		(0)
+#define kbd_init_hw(x...)	(0)
+#define kbd_enable_irq(x...)	(0)
+#define kbd_disable_irq(x...)	(0)
+
+#endif
+
+
+#endif  /* _SA1100_KEYBOARD_H */
 
-#define SYSRQ_KEY	0x54

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