Staging: comedi: kcomedilib: comedi_do_insn is now static
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / input / serio / i8042.h
blobcbc1beb66574d51d8e15f70845b78631e8349e4c
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_HAS_I8042)
20 #include "i8042-ip22io.h"
21 #elif defined(CONFIG_SNI_RM)
22 #include "i8042-snirm.h"
23 #elif defined(CONFIG_PPC)
24 #include "i8042-ppcio.h"
25 #elif defined(CONFIG_SPARC)
26 #include "i8042-sparcio.h"
27 #elif defined(CONFIG_X86) || defined(CONFIG_IA64)
28 #include "i8042-x86ia64io.h"
29 #else
30 #include "i8042-io.h"
31 #endif
34 * This is in 50us units, the time we wait for the i8042 to react. This
35 * has to be long enough for the i8042 itself to timeout on sending a byte
36 * to a non-existent mouse.
39 #define I8042_CTL_TIMEOUT 10000
42 * Status register bits.
45 #define I8042_STR_PARITY 0x80
46 #define I8042_STR_TIMEOUT 0x40
47 #define I8042_STR_AUXDATA 0x20
48 #define I8042_STR_KEYLOCK 0x10
49 #define I8042_STR_CMDDAT 0x08
50 #define I8042_STR_MUXERR 0x04
51 #define I8042_STR_IBF 0x02
52 #define I8042_STR_OBF 0x01
55 * Control register bits.
58 #define I8042_CTR_KBDINT 0x01
59 #define I8042_CTR_AUXINT 0x02
60 #define I8042_CTR_IGNKEYLOCK 0x08
61 #define I8042_CTR_KBDDIS 0x10
62 #define I8042_CTR_AUXDIS 0x20
63 #define I8042_CTR_XLATE 0x40
66 * Return codes.
69 #define I8042_RET_CTL_TEST 0x55
72 * Expected maximum internal i8042 buffer size. This is used for flushing
73 * the i8042 buffers.
76 #define I8042_BUFFER_SIZE 16
79 * Number of AUX ports on controllers supporting active multiplexing
80 * specification
83 #define I8042_NUM_MUX_PORTS 4
86 * Debug.
89 #ifdef DEBUG
90 static unsigned long i8042_start_time;
91 #define dbg_init() do { i8042_start_time = jiffies; } while (0)
92 #define dbg(format, arg...) \
93 do { \
94 if (i8042_debug) \
95 printk(KERN_DEBUG __FILE__ ": " format " [%d]\n" , \
96 ## arg, (int) (jiffies - i8042_start_time)); \
97 } while (0)
98 #else
99 #define dbg_init() do { } while (0)
100 #define dbg(format, arg...) do {} while (0)
101 #endif
103 #endif /* _I8042_H */