Lines Matching refs:usage

62 #define map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c))
124 * - get a reasonable usage max for the vendor collection
140 struct hid_usage *usage, unsigned long **bit, int *max)
142 if (usage->hid == (HID_UP_BUTTON | 0x0010)) {
153 struct hid_usage *usage, unsigned long **bit, int *max)
156 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_MSVENDOR ||
157 (usage->hid & HID_USAGE_PAGE) == HID_UP_LNVENDOR) {
158 switch (usage->hid & HID_USAGE) {
194 if (usage->hid == HID_GD_WHEEL)
196 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON &&
197 (usage->hid & HID_USAGE) == 0x003)
199 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER &&
200 (usage->hid & HID_USAGE) == 0x238)
204 if ((usage->hid & HID_USAGE_PAGE) == 0xff100000 ||
205 (usage->hid & HID_USAGE_PAGE) == 0xffa10000) {
210 switch (usage->hid & HID_USAGE) {
212 hid_map_usage(hi, usage, bit, max, EV_REL, REL_HWHEEL);
215 hid_map_usage(hi, usage, bit, max, EV_REL, REL_WHEEL);
227 struct hid_usage *usage, unsigned long **bit, int *max)
229 if (usage->hid == HID_GD_Z) {
230 hid_map_usage(hi, usage, bit, max, EV_REL, REL_HWHEEL);
238 struct hid_usage *usage, unsigned long **bit, int *max)
241 * The ThinkPad 10 Ultrabook Keyboard uses 0x000c0001 usage for
244 if (usage->hid == 0x000c0001) {
245 switch (usage->usage_index) {
268 if (usage->hid == 0x00070072)
276 struct hid_usage *usage, unsigned long **bit, int *max)
281 usage, bit, max);
285 usage, bit, max);
293 usage, bit, max);
296 usage, bit, max);
448 * its own key is outside the usage page range. Remove extra
449 * keypresses and remap to inside usage page.
464 struct hid_field *field, struct hid_usage *usage, __s32 value)
468 if (usage->type == EV_KEY && usage->code == KEY_FN_ESC && value == 1) {
482 struct hid_field *field, struct hid_usage *usage, __s32 value)
494 usage->type == EV_REL &&
495 (usage->code == REL_X || usage->code == REL_Y)) {
504 if (usage->type == EV_REL && (usage->code == REL_WHEEL ||
505 usage->code == REL_HWHEEL)) {
512 if (usage->type == EV_KEY && usage->code == BTN_MIDDLE) {
535 struct hid_usage *usage, __s32 value)
543 return lenovo_event_cptkbd(hdev, field, usage, value);
545 return lenovo_event_tp10ubkbd(hdev, field, usage, value);