* added 0.99 linux version
[mascara-docs.git] / i386 / linux / linux-2.3.21 / include / asm-ppc / keyboard.h
blob01f470377497b98a308d0c9badf638e2e0ed5894
1 /*
2 * linux/include/asm-ppc/keyboard.h
4 * Created 3 Nov 1996 by Geert Uytterhoeven
5 * Modified for Power Macintosh by Paul Mackerras
6 */
8 /*
9 * This file contains the ppc architecture specific keyboard definitions -
10 * like the intel pc for prep systems, different for power macs.
13 #ifndef __ASMPPC_KEYBOARD_H
14 #define __ASMPPC_KEYBOARD_H
16 #ifdef __KERNEL__
18 #include <linux/config.h>
19 #include <linux/adb.h>
20 #include <asm/machdep.h>
22 #define KEYBOARD_IRQ 1
23 #define DISABLE_KBD_DURING_INTERRUPTS 0
24 #define INIT_KBD
26 static inline int kbd_setkeycode(unsigned int scancode, unsigned int keycode)
28 if ( ppc_md.kbd_setkeycode )
29 return ppc_md.kbd_setkeycode(scancode, keycode);
30 else
31 return 0;
34 static inline int kbd_getkeycode(unsigned int scancode)
36 if ( ppc_md.kbd_getkeycode )
37 return ppc_md.kbd_getkeycode(scancode);
38 else
39 return 0;
42 static inline int kbd_translate(unsigned char keycode, unsigned char *keycodep,
43 char raw_mode)
45 if ( ppc_md.kbd_translate )
46 return ppc_md.kbd_translate(keycode, keycodep, raw_mode);
47 else
48 return 0;
51 static inline int kbd_unexpected_up(unsigned char keycode)
53 if ( ppc_md.kbd_unexpected_up )
54 return ppc_md.kbd_unexpected_up(keycode);
55 else
56 return 0;
59 static inline void kbd_leds(unsigned char leds)
61 if ( ppc_md.kbd_leds )
62 ppc_md.kbd_leds(leds);
65 static inline void kbd_init_hw(void)
67 if ( ppc_md.kbd_init_hw )
68 ppc_md.kbd_init_hw();
71 #define kbd_sysrq_xlate (ppc_md.ppc_kbd_sysrq_xlate)
73 extern unsigned long SYSRQ_KEY;
75 #endif /* __KERNEL__ */
77 #endif /* __ASMPPC_KEYBOARD_H */