2 * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3 * ---------------------------------------------------------------
4 * This file will be removed as soon as we have converted
5 * hp_psaux.c and hp_keyb.c to the input layer !
11 * linux/include/asm-parisc/keyboard.h
13 * Original by Geert Uytterhoeven
14 * updates by Alex deVries <adevries@thepuffingroup.com>
15 * portions copyright (1999) The Puffin Group
16 * mostly rewritten by Philipp Rumpf <prumpf@tux.org>,
17 * Copyright 2000 Philipp Rumpf
21 * We try to keep the amount of generic code as low as possible -
22 * we want to support all HIL, PS/2, and untranslated USB keyboards
25 #ifndef _PARISC_KEYBOARD_H
26 #define _PARISC_KEYBOARD_H
28 #include <linux/config.h>
33 #include <linux/kernel.h>
36 /* These are basically the generic functions / variables. The only
37 * unexpected detail is the initialization sequence for the keyboard
38 * driver is something like this:
40 * detect keyboard port
42 * call register_kbd_ops
45 * only after init_hw has been called you're allowed to call
46 * handle_scancode. This means you either have to be extremely
47 * careful or use a global flag or something - I strongly suggest
48 * the latter. prumpf */
50 extern struct kbd_ops {
51 int (*setkeycode)(unsigned int, unsigned int);
52 int (*getkeycode)(unsigned int);
53 int (*translate)(unsigned char, unsigned char *, char);
54 char (*unexpected_up)(unsigned char);
55 void (*leds)(unsigned char);
56 void (*init_hw)(void);
58 unsigned char sysrq_key;
59 unsigned char *sysrq_xlate;
62 #define kbd_setkeycode (*kbd_ops->setkeycode)
63 #define kbd_getkeycode (*kbd_ops->getkeycode)
64 #define kbd_translate (*kbd_ops->translate)
65 #define kbd_unexpected_up (*kbd_ops->unexpected_up)
66 #define kbd_leds (*kbd_ops->leds)
67 #define kbd_init_hw (*kbd_ops->init_hw)
69 #define SYSRQ_KEY (kbd_ops->sysrq_key)
70 #define kbd_sysrq_xlate (kbd_ops->sysrq_xlate)
71 extern unsigned char hp_ps2kbd_sysrq_xlate[128]; /* from drivers/char/hp_keyb.c */
73 extern void unregister_kbd_ops(void);
74 extern void register_kbd_ops(struct kbd_ops *ops);
76 #endif /* CONFIG_VT */
78 #endif /* __KERNEL__ */
80 #endif /* __ASMPARISC_KEYBOARD_H */