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

Subversion Repositories or1k

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

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

Line No. Rev Author Line
1 1276 phoenix
/*
2
 *  linux/include/asm-arm/keyboard.h
3
 *
4
 *  Copyright (C) 1998 Russell King
5
 *
6
 * This program is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License version 2 as
8
 * published by the Free Software Foundation.
9
 *
10
 *  Keyboard driver definitions for ARM
11
 */
12
#ifndef __ASM_ARM_KEYBOARD_H
13
#define __ASM_ARM_KEYBOARD_H
14
 
15
#include <linux/kd.h>
16
#include <linux/pm.h>
17
 
18
/*
19
 * We provide a unified keyboard interface when in VC_MEDIUMRAW
20
 * mode.  This means that all keycodes must be common between
21
 * all supported keyboards.  This unfortunately puts us at odds
22
 * with the PC keyboard interface chip... but we can't do anything
23
 * about that now.
24
 */
25
#ifdef __KERNEL__
26
 
27
extern int  (*k_setkeycode)(unsigned int, unsigned int);
28
extern int  (*k_getkeycode)(unsigned int);
29
extern int  (*k_translate)(unsigned char, unsigned char *, char);
30
extern char (*k_unexpected_up)(unsigned char);
31
extern void (*k_leds)(unsigned char);
32
 
33
 
34
static inline int kbd_setkeycode(unsigned int sc, unsigned int kc)
35
{
36
        int ret = -EINVAL;
37
 
38
        if (k_setkeycode)
39
                ret = k_setkeycode(sc, kc);
40
 
41
        return ret;
42
}
43
 
44
static inline int kbd_getkeycode(unsigned int sc)
45
{
46
        int ret = -EINVAL;
47
 
48
        if (k_getkeycode)
49
                ret = k_getkeycode(sc);
50
 
51
        return ret;
52
}
53
 
54
static inline void kbd_leds(unsigned char leds)
55
{
56
        if (k_leds)
57
                k_leds(leds);
58
}
59
 
60
extern int k_sysrq_key;
61
extern unsigned char *k_sysrq_xlate;
62
 
63
#define SYSRQ_KEY               k_sysrq_key
64
#define kbd_sysrq_xlate         k_sysrq_xlate
65
#define kbd_translate           k_translate
66
#define kbd_unexpected_up       k_unexpected_up
67
 
68
#include <asm/arch/keyboard.h>
69
 
70
#endif /* __KERNEL__ */
71
 
72
#endif /* __ASM_ARM_KEYBOARD_H */

powered by: WebSVN 2.1.0

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