V4L/DVB (6715): ivtv: Remove unnecessary register update
[linux-2.6/verdex.git] / drivers / input / serio / i8042.h
blobdd22d91f8b39bd1c16abf0a755096fb7af44147f
1 #ifndef _I8042_H
2 #define _I8042_H
5 /*
6 * Copyright (c) 1999-2002 Vojtech Pavlik
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 2 as published by
10 * the Free Software Foundation.
14 * Arch-dependent inline functions and defines.
17 #if defined(CONFIG_MACH_JAZZ)
18 #include "i8042-jazzio.h"
19 #elif defined(CONFIG_SGI_IP22)
20 #include "i8042-ip22io.h"
21 #elif defined(CONFIG_PPC)
22 #include "i8042-ppcio.h"
23 #elif defined(CONFIG_SPARC)
24 #include "i8042-sparcio.h"
25 #elif defined(CONFIG_X86) || defined(CONFIG_IA64)
26 #include "i8042-x86ia64io.h"
27 #else
28 #include "i8042-io.h"
29 #endif
32 * This is in 50us units, the time we wait for the i8042 to react. This
33 * has to be long enough for the i8042 itself to timeout on sending a byte
34 * to a non-existent mouse.
37 #define I8042_CTL_TIMEOUT 10000
40 * Status register bits.
43 #define I8042_STR_PARITY 0x80
44 #define I8042_STR_TIMEOUT 0x40
45 #define I8042_STR_AUXDATA 0x20
46 #define I8042_STR_KEYLOCK 0x10
47 #define I8042_STR_CMDDAT 0x08
48 #define I8042_STR_MUXERR 0x04
49 #define I8042_STR_IBF 0x02
50 #define I8042_STR_OBF 0x01
53 * Control register bits.
56 #define I8042_CTR_KBDINT 0x01
57 #define I8042_CTR_AUXINT 0x02
58 #define I8042_CTR_IGNKEYLOCK 0x08
59 #define I8042_CTR_KBDDIS 0x10
60 #define I8042_CTR_AUXDIS 0x20
61 #define I8042_CTR_XLATE 0x40
64 * Return codes.
67 #define I8042_RET_CTL_TEST 0x55
70 * Expected maximum internal i8042 buffer size. This is used for flushing
71 * the i8042 buffers.
74 #define I8042_BUFFER_SIZE 16
77 * Number of AUX ports on controllers supporting active multiplexing
78 * specification
81 #define I8042_NUM_MUX_PORTS 4
84 * Debug.
87 #ifdef DEBUG
88 static unsigned long i8042_start_time;
89 #define dbg_init() do { i8042_start_time = jiffies; } while (0)
90 #define dbg(format, arg...) \
91 do { \
92 if (i8042_debug) \
93 printk(KERN_DEBUG __FILE__ ": " format " [%d]\n" , \
94 ## arg, (int) (jiffies - i8042_start_time)); \
95 } while (0)
96 #else
97 #define dbg_init() do { } while (0)
98 #define dbg(format, arg...) do {} while (0)
99 #endif
101 #endif /* _I8042_H */