1 /*
2 * linux/include/asm-parisc/keyboard.h
3 *
4 * Original by Geert Uytterhoeven
5 * updates by Alex deVries <adevries@thepuffingroup.com>
6 * portions copyright (1999) The Puffin Group
7 * mostly rewritten by Philipp Rumpf <prumpf@tux.org>,
8 * Copyright 2000 Philipp Rumpf
9 */
10
11 /*
12 * We try to keep the amount of generic code as low as possible -
13 * we want to support all HIL, PS/2, and untranslated USB keyboards
14 */
15
16 #ifndef _PARISC_KEYBOARD_H
17 #define _PARISC_KEYBOARD_H
18
19 #include <linux/config.h>
20
21 #ifdef __KERNEL__
22 #ifdef CONFIG_VT
23
24 /* These are basically the generic functions / variables. The only
25 * unexpected detail is the initialization sequence for the keyboard
26 * driver is something like this:
27 *
28 * detect keyboard port
29 * detect keyboard
30 * call register_kbd_ops
31 * wait for init_hw
32 *
33 * only after init_hw has been called you're allowed to call
34 * handle_scancode. This means you either have to be extremely
35 * careful or use a global flag or something - I strongly suggest
36 * the latter. prumpf */
37
38 extern struct kbd_ops {
39 int (*setkeycode)(unsigned int, unsigned int);
40 int (*getkeycode)(unsigned int);
41 int (*translate)(unsigned char, unsigned char *, char);
42 char (*unexpected_up)(unsigned char);
43 void (*leds)(unsigned char);
44 void (*init_hw)(void);
45
46 unsigned char sysrq_key;
47 unsigned char *sysrq_xlate;
48 } *kbd_ops;
49
50 #define kbd_setkeycode (*kbd_ops->setkeycode)
51 #define kbd_getkeycode (*kbd_ops->getkeycode)
52 #define kbd_translate (*kbd_ops->translate)
53 #define kbd_unexpected_up (*kbd_ops->unexpected_up)
54 #define kbd_leds (*kbd_ops->leds)
55 #define kbd_init_hw (*kbd_ops->init_hw)
56
57 #define SYSRQ_KEY (kbd_ops->sysrq_key)
58 #define kbd_sysrq_xlate (kbd_ops->sysrq_xlate)
59 extern unsigned char hp_ps2kbd_sysrq_xlate[128]; /* from drivers/char/hp_keyb.c */
60
61 extern void register_kbd_ops(struct kbd_ops *ops);
62
63 #endif /* CONFIG_VT */
64
65 #endif /* __KERNEL__ */
66
67 #endif /* __ASMPARISC_KEYBOARD_H */
68
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.