Go to the documentation of this file.
4 #define PSMOUSE_CMD_SETSCALE11 0x00e6
5 #define PSMOUSE_CMD_SETSCALE21 0x00e7
6 #define PSMOUSE_CMD_SETRES 0x10e8
7 #define PSMOUSE_CMD_GETINFO 0x03e9
8 #define PSMOUSE_CMD_SETSTREAM 0x00ea
9 #define PSMOUSE_CMD_SETPOLL 0x00f0
10 #define PSMOUSE_CMD_POLL 0x00eb
11 #define PSMOUSE_CMD_RESET_WRAP 0x00ec
12 #define PSMOUSE_CMD_GETID 0x02f2
13 #define PSMOUSE_CMD_SETRATE 0x10f3
14 #define PSMOUSE_CMD_ENABLE 0x00f4
15 #define PSMOUSE_CMD_DISABLE 0x00f5
16 #define PSMOUSE_CMD_RESET_DIS 0x00f6
17 #define PSMOUSE_CMD_RESET_BAT 0x02ff
19 #define PSMOUSE_RET_BAT 0xaa
20 #define PSMOUSE_RET_ID 0x00
21 #define PSMOUSE_RET_ACK 0xfa
22 #define PSMOUSE_RET_NAK 0xfe
41 struct input_dev *
dev;
102 unsigned long delay);
119 #define to_psmouse_attr(a) container_of((a), struct psmouse_attribute, dattr)
126 #define __PSMOUSE_DEFINE_ATTR_VAR(_name, _mode, _data, _show, _set, _protect) \
127 static struct psmouse_attribute psmouse_attr_##_name = { \
130 .name = __stringify(_name), \
133 .show = psmouse_attr_show_helper, \
134 .store = psmouse_attr_set_helper, \
139 .protect = _protect, \
142 #define __PSMOUSE_DEFINE_ATTR(_name, _mode, _data, _show, _set, _protect) \
143 static ssize_t _show(struct psmouse *, void *, char *); \
144 static ssize_t _set(struct psmouse *, void *, const char *, size_t); \
145 __PSMOUSE_DEFINE_ATTR_VAR(_name, _mode, _data, _show, _set, _protect)
147 #define PSMOUSE_DEFINE_ATTR(_name, _mode, _data, _show, _set) \
148 __PSMOUSE_DEFINE_ATTR(_name, _mode, _data, _show, _set, true)
150 #define PSMOUSE_DEFINE_RO_ATTR(_name, _mode, _data, _show) \
151 static ssize_t _show(struct psmouse *, void *, char *); \
152 __PSMOUSE_DEFINE_ATTR_VAR(_name, _mode, _data, _show, NULL, true)
154 #define PSMOUSE_DEFINE_WO_ATTR(_name, _mode, _data, _set) \
155 static ssize_t _set(struct psmouse *, void *, const char *, size_t); \
156 __PSMOUSE_DEFINE_ATTR_VAR(_name, _mode, _data, NULL, _set, true)
159 #define psmouse_fmt(fmt) KBUILD_BASENAME ": " fmt
162 #define psmouse_dbg(psmouse, format, ...) \
163 dev_dbg(&(psmouse)->ps2dev.serio->dev, \
164 psmouse_fmt(format), ##__VA_ARGS__)
165 #define psmouse_info(psmouse, format, ...) \
166 dev_info(&(psmouse)->ps2dev.serio->dev, \
167 psmouse_fmt(format), ##__VA_ARGS__)
168 #define psmouse_warn(psmouse, format, ...) \
169 dev_warn(&(psmouse)->ps2dev.serio->dev, \
170 psmouse_fmt(format), ##__VA_ARGS__)
171 #define psmouse_err(psmouse, format, ...) \
172 dev_err(&(psmouse)->ps2dev.serio->dev, \
173 psmouse_fmt(format), ##__VA_ARGS__)
174 #define psmouse_notice(psmouse, format, ...) \
175 dev_notice(&(psmouse)->ps2dev.serio->dev, \
176 psmouse_fmt(format), ##__VA_ARGS__)
177 #define psmouse_printk(level, psmouse, format, ...) \
179 &(psmouse)->ps2dev.serio->dev, \
180 psmouse_fmt(format), ##__VA_ARGS__)