OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-parisc/] [keyboard.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
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 !
6
 *
7
 */
8
 
9
 
10
/*
11
 *  linux/include/asm-parisc/keyboard.h
12
 *
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
18
 */
19
 
20
/*
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
23
 */
24
 
25
#ifndef _PARISC_KEYBOARD_H
26
#define _PARISC_KEYBOARD_H
27
 
28
#include <linux/config.h>
29
 
30
#ifdef __KERNEL__
31
#ifdef CONFIG_VT
32
 
33
#include <linux/kernel.h>
34
#include <linux/kd.h>
35
 
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:
39
 *
40
 *  detect keyboard port
41
 *  detect keyboard
42
 *  call register_kbd_ops
43
 *  wait for init_hw
44
 *
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 */
49
 
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);
57
 
58
        unsigned char sysrq_key;
59
        unsigned char *sysrq_xlate;
60
} *kbd_ops;
61
 
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)
68
 
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 */
72
 
73
extern void unregister_kbd_ops(void);
74
extern void register_kbd_ops(struct kbd_ops *ops);
75
 
76
#endif /* CONFIG_VT */
77
 
78
#endif /* __KERNEL__ */
79
 
80
#endif /* __ASMPARISC_KEYBOARD_H */

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.