Import 2.1.116pre2
[davej-history.git] / include / asm-m68k / keyboard.h
blobc30c8dc0471334ec0c276c02f9d0c34fefdc13e9
1 /*
2 * linux/include/asm-m68k/keyboard.h
4 * Created 3 Nov 1996 by Geert Uytterhoeven
5 */
7 /*
8 * This file contains the m68k architecture specific keyboard definitions
9 */
11 #include <linux/config.h> /* CONFIG_MAGIC_SYSRQ */
12 #ifndef __M68K_KEYBOARD_H
13 #define __M68K_KEYBOARD_H
15 #ifdef __KERNEL__
17 #include <asm/machdep.h>
19 static __inline__ int kbd_setkeycode(unsigned int scancode,
20 unsigned int keycode)
22 return -EOPNOTSUPP;
25 static __inline__ int kbd_getkeycode(unsigned int scancode)
27 return scancode > 127 ? -EINVAL : scancode;
30 static __inline__ int kbd_pretranslate(unsigned char scancode, char raw_mode)
32 return 1;
35 static __inline__ int kbd_translate(unsigned char scancode,
36 unsigned char *keycode, char raw_mode)
38 *keycode = scancode;
39 return 1;
42 static __inline__ char kbd_unexpected_up(unsigned char keycode)
44 return 0200;
47 static __inline__ void kbd_leds(unsigned char leds)
49 if (mach_kbd_leds)
50 mach_kbd_leds(leds);
53 #ifdef CONFIG_MAGIC_SYSRQ
54 #define kbd_is_sysrq(keycode) ((keycode) == mach_sysrq_key && \
55 (up_flag || \
56 (shift_state & mach_sysrq_shift_mask) == \
57 mach_sysrq_shift_state))
58 #define kbd_sysrq_xlate mach_sysrq_xlate
59 #endif
61 #define kbd_init_hw mach_keyb_init
63 #endif /* __KERNEL__ */
65 #endif /* __M68K_KEYBOARD_H */