0001
0002 #ifndef _I8042_H
0003 #define _I8042_H
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #if defined(CONFIG_MACH_JAZZ)
0015 #include "i8042-jazzio.h"
0016 #elif defined(CONFIG_SGI_HAS_I8042)
0017 #include "i8042-ip22io.h"
0018 #elif defined(CONFIG_SNI_RM)
0019 #include "i8042-snirm.h"
0020 #elif defined(CONFIG_SPARC)
0021 #include "i8042-sparcio.h"
0022 #elif defined(CONFIG_X86) || defined(CONFIG_IA64)
0023 #include "i8042-x86ia64io.h"
0024 #else
0025 #include "i8042-io.h"
0026 #endif
0027
0028
0029
0030
0031
0032
0033
0034 #define I8042_CTL_TIMEOUT 10000
0035
0036
0037
0038
0039
0040 #define I8042_RET_CTL_TEST 0x55
0041
0042
0043
0044
0045
0046
0047 #define I8042_BUFFER_SIZE 16
0048
0049
0050
0051
0052
0053
0054 #define I8042_NUM_MUX_PORTS 4
0055
0056
0057
0058
0059
0060 #ifdef DEBUG
0061 static unsigned long i8042_start_time;
0062 #define dbg_init() do { i8042_start_time = jiffies; } while (0)
0063 #define dbg(format, arg...) \
0064 do { \
0065 if (i8042_debug) \
0066 printk(KERN_DEBUG KBUILD_MODNAME ": [%d] " format, \
0067 (int) (jiffies - i8042_start_time), ##arg); \
0068 } while (0)
0069
0070 #define filter_dbg(filter, data, format, args...) \
0071 do { \
0072 if (!i8042_debug) \
0073 break; \
0074 \
0075 if (!filter || i8042_unmask_kbd_data) \
0076 dbg("%02x " format, data, ##args); \
0077 else \
0078 dbg("** " format, ##args); \
0079 } while (0)
0080 #else
0081 #define dbg_init() do { } while (0)
0082 #define dbg(format, arg...) \
0083 do { \
0084 if (0) \
0085 printk(KERN_DEBUG pr_fmt(format), ##arg); \
0086 } while (0)
0087
0088 #define filter_dbg(filter, data, format, args...) do { } while (0)
0089 #endif
0090
0091 #endif