/drivers/hid/ |
D | hid-input.c | 63 #define map_abs(c) hid_map_usage(hidinput, usage, &bit, &max, EV_ABS, (c)) 64 #define map_rel(c) hid_map_usage(hidinput, usage, &bit, &max, EV_REL, (c)) 65 #define map_key(c) hid_map_usage(hidinput, usage, &bit, &max, EV_KEY, (c)) 66 #define map_led(c) hid_map_usage(hidinput, usage, &bit, &max, EV_LED, (c)) 68 #define map_abs_clear(c) hid_map_usage_clear(hidinput, usage, &bit, \ 70 #define map_key_clear(c) hid_map_usage_clear(hidinput, usage, &bit, \ 73 static bool match_scancode(struct hid_usage *usage, in match_scancode() argument 76 return (usage->hid & (HID_USAGE_PAGE | HID_USAGE)) == scancode; in match_scancode() 79 static bool match_keycode(struct hid_usage *usage, in match_keycode() argument 85 return (usage->type == EV_KEY && usage->code == keycode); in match_keycode() [all …]
|
D | hid-lg.c | 152 #define lg_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 156 struct hid_usage *usage, unsigned long **bit, int *max) in lg_ultrax_remote_mapping() argument 158 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) in lg_ultrax_remote_mapping() 162 switch (usage->hid & HID_USAGE) { in lg_ultrax_remote_mapping() 188 static int lg_dinovo_mapping(struct hid_input *hi, struct hid_usage *usage, in lg_dinovo_mapping() argument 191 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) in lg_dinovo_mapping() 194 switch (usage->hid & HID_USAGE) { in lg_dinovo_mapping() 204 static int lg_wireless_mapping(struct hid_input *hi, struct hid_usage *usage, in lg_wireless_mapping() argument 207 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) in lg_wireless_mapping() 210 switch (usage->hid & HID_USAGE) { in lg_wireless_mapping() [all …]
|
D | hid-microsoft.c | 59 #define ms_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 61 static int ms_ergonomy_kb_quirk(struct hid_input *hi, struct hid_usage *usage, in ms_ergonomy_kb_quirk() argument 66 switch (usage->hid & HID_USAGE) { in ms_ergonomy_kb_quirk() 83 static int ms_presenter_8k_quirk(struct hid_input *hi, struct hid_usage *usage, in ms_presenter_8k_quirk() argument 87 switch (usage->hid & HID_USAGE) { in ms_presenter_8k_quirk() 100 struct hid_field *field, struct hid_usage *usage, in ms_input_mapping() argument 105 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR) in ms_input_mapping() 109 int ret = ms_ergonomy_kb_quirk(hi, usage, bit, max); in ms_input_mapping() 115 ms_presenter_8k_quirk(hi, usage, bit, max)) in ms_input_mapping() 122 struct hid_field *field, struct hid_usage *usage, in ms_input_mapped() argument [all …]
|
D | hid-gyration.c | 26 #define gy_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 29 struct hid_field *field, struct hid_usage *usage, in gyration_input_mapping() argument 32 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) in gyration_input_mapping() 36 switch (usage->hid & HID_USAGE) { in gyration_input_mapping() 59 struct hid_usage *usage, __s32 value) in gyration_event() argument 65 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK && in gyration_event() 66 (usage->hid & 0xff) == 0x82) { in gyration_event() 68 input_event(input, usage->type, usage->code, 1); in gyration_event() 70 input_event(input, usage->type, usage->code, 0); in gyration_event()
|
D | hid-ezkey.c | 26 #define ez_map_rel(c) hid_map_usage(hi, usage, bit, max, EV_REL, (c)) 27 #define ez_map_key(c) hid_map_usage(hi, usage, bit, max, EV_KEY, (c)) 30 struct hid_field *field, struct hid_usage *usage, in ez_input_mapping() argument 33 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) in ez_input_mapping() 36 switch (usage->hid & HID_USAGE) { in ez_input_mapping() 52 struct hid_usage *usage, __s32 value) in ez_event() argument 55 !usage->type) in ez_event() 59 if (usage->type == EV_REL && usage->code == REL_HWHEEL) { in ez_event() 61 input_event(input, usage->type, REL_WHEEL, -value); in ez_event()
|
D | hid-a4tech.c | 37 struct hid_field *field, struct hid_usage *usage, in a4_input_mapped() argument 42 if (usage->type == EV_REL && usage->code == REL_WHEEL) in a4_input_mapped() 45 if ((a4->quirks & A4_2WHEEL_MOUSE_HACK_7) && usage->hid == 0x00090007) in a4_input_mapped() 52 struct hid_usage *usage, __s32 value) in a4_event() argument 58 !usage->type) in a4_event() 64 if (usage->type == EV_REL && usage->code == REL_WHEEL) { in a4_event() 69 if (usage->hid == 0x000100b8) { in a4_event() 76 if ((a4->quirks & A4_2WHEEL_MOUSE_HACK_7) && usage->hid == 0x00090007) { in a4_event() 81 if (usage->code == REL_WHEEL && a4->hw_wheel) { in a4_event() 82 input_event(input, usage->type, REL_HWHEEL, value); in a4_event()
|
D | hid-apple.c | 169 struct hid_usage *usage, __s32 value) in hidinput_apple_event() argument 174 if (usage->code == KEY_FN) { in hidinput_apple_event() 176 input_event(input, usage->type, usage->code, value); in hidinput_apple_event() 191 trans = apple_find_translation (table, usage->code); in hidinput_apple_event() 194 if (test_bit(usage->code, asc->pressed_fn)) in hidinput_apple_event() 204 set_bit(usage->code, asc->pressed_fn); in hidinput_apple_event() 206 clear_bit(usage->code, asc->pressed_fn); in hidinput_apple_event() 208 input_event(input, usage->type, trans->to, in hidinput_apple_event() 216 (test_bit(usage->code, asc->pressed_numlock) || in hidinput_apple_event() 219 usage->code); in hidinput_apple_event() [all …]
|
D | hid-multitouch.c | 257 struct hid_field *field, struct hid_usage *usage) in mt_feature_mapping() argument 261 switch (usage->hid) { in mt_feature_mapping() 285 static void mt_store_field(struct hid_usage *usage, struct mt_device *td, in mt_store_field() argument 293 f->usages[f->length++] = usage->hid; in mt_store_field() 297 struct hid_field *field, struct hid_usage *usage, in mt_input_mapping() argument 318 (usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON || in mt_input_mapping() 343 switch (usage->hid & HID_USAGE_PAGE) { in mt_input_mapping() 346 switch (usage->hid) { in mt_input_mapping() 348 hid_map_usage(hi, usage, bit, max, in mt_input_mapping() 354 mt_store_field(usage, td, hi); in mt_input_mapping() [all …]
|
D | hid-cypress.c | 57 struct hid_field *field, struct hid_usage *usage, in cp_input_mapped() argument 65 if (usage->type == EV_REL && usage->code == REL_WHEEL) in cp_input_mapped() 67 if (usage->hid == 0x00090005) in cp_input_mapped() 74 struct hid_usage *usage, __s32 value) in cp_event() argument 79 !usage->type || !(quirks & CP_2WHEEL_MOUSE_HACK)) in cp_event() 82 if (usage->hid == 0x00090005) { in cp_event() 91 if (usage->code == REL_WHEEL && (quirks & CP_2WHEEL_MOUSE_HACK_ON)) { in cp_event() 94 input_event(input, usage->type, REL_HWHEEL, value); in cp_event()
|
D | hid-petalynx.c | 39 #define pl_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 42 struct hid_field *field, struct hid_usage *usage, in pl_input_mapping() argument 45 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_LOGIVENDOR) { in pl_input_mapping() 46 switch (usage->hid & HID_USAGE) { in pl_input_mapping() 58 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) { in pl_input_mapping() 59 switch (usage->hid & HID_USAGE) { in pl_input_mapping()
|
D | hid-samsung.c | 99 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c)) 102 struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, in samsung_kbd_mouse_input_mapping() argument 108 if (1 != ifnum || HID_UP_CONSUMER != (usage->hid & HID_USAGE_PAGE)) in samsung_kbd_mouse_input_mapping() 112 usage->hid & HID_USAGE); in samsung_kbd_mouse_input_mapping() 114 switch (usage->hid & HID_USAGE) { in samsung_kbd_mouse_input_mapping() 143 struct hid_field *field, struct hid_usage *usage, in samsung_input_mapping() argument 150 hi, field, usage, bit, max); in samsung_input_mapping()
|
D | hid-tivo.c | 22 #define tivo_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 26 struct hid_field *field, struct hid_usage *usage, in tivo_input_mapping() argument 29 switch (usage->hid & HID_USAGE_PAGE) { in tivo_input_mapping() 31 switch (usage->hid & HID_USAGE) { in tivo_input_mapping() 45 switch (usage->hid & HID_USAGE) { in tivo_input_mapping()
|
D | hid-debug.c | 46 unsigned usage; member 400 char *hid_resolv_usage(unsigned usage, struct seq_file *f) { in hid_resolv_usage() argument 405 buf = resolv_usage_page(usage >> 16, f); in hid_resolv_usage() 421 if (p->page == (usage >> 16)) { in hid_resolv_usage() 422 for(++p; p->description && p->usage != 0; p++) in hid_resolv_usage() 423 if (p->usage == (usage & 0xffff)) { in hid_resolv_usage() 438 "%04x", usage & 0xffff); in hid_resolv_usage() 440 seq_printf(f, "%04x", usage & 0xffff); in hid_resolv_usage() 469 tab(n+2, f); hid_resolv_usage(field->usage[j].hid, f); seq_printf(f, "\n"); in hid_dump_field() 594 void hid_dump_input(struct hid_device *hdev, struct hid_usage *usage, __s32 value) in hid_dump_input() argument [all …]
|
D | hid-kensington.c | 21 #define ks_map_key(c) hid_map_usage(hi, usage, bit, max, EV_KEY, (c)) 24 struct hid_field *field, struct hid_usage *usage, in ks_input_mapping() argument 27 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR) in ks_input_mapping() 30 switch (usage->hid & HID_USAGE) { in ks_input_mapping()
|
D | hid-lcpower.c | 21 #define ts_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 24 struct hid_field *field, struct hid_usage *usage, in ts_input_mapping() argument 27 if ((usage->hid & HID_USAGE_PAGE) != 0x0ffbc0000) in ts_input_mapping() 30 switch (usage->hid & HID_USAGE) { in ts_input_mapping()
|
D | hid-sunplus.c | 37 #define sp_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 40 struct hid_field *field, struct hid_usage *usage, in sp_input_mapping() argument 43 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) in sp_input_mapping() 46 switch (usage->hid & HID_USAGE) { in sp_input_mapping()
|
D | hid-monterey.c | 35 #define mr_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 38 struct hid_field *field, struct hid_usage *usage, in mr_input_mapping() argument 41 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) in mr_input_mapping() 44 switch (usage->hid & HID_USAGE) { in mr_input_mapping()
|
D | hid-cherry.c | 40 #define ch_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 43 struct hid_field *field, struct hid_usage *usage, in ch_input_mapping() argument 46 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) in ch_input_mapping() 49 switch (usage->hid & HID_USAGE) { in ch_input_mapping()
|
D | hid-chicony.c | 26 #define ch_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 29 struct hid_field *field, struct hid_usage *usage, in ch_input_mapping() argument 32 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR) in ch_input_mapping() 36 switch (usage->hid & HID_USAGE) { in ch_input_mapping()
|
D | hid-ntrig.c | 459 struct hid_field *field, struct hid_usage *usage, in ntrig_input_mapping() argument 468 switch (usage->hid & HID_USAGE_PAGE) { in ntrig_input_mapping() 470 switch (usage->hid) { in ntrig_input_mapping() 472 hid_map_usage(hi, usage, bit, max, in ntrig_input_mapping() 494 hid_map_usage(hi, usage, bit, max, in ntrig_input_mapping() 519 switch (usage->hid) { in ntrig_input_mapping() 529 hid_map_usage(hi, usage, bit, max, in ntrig_input_mapping() 533 hid_map_usage(hi, usage, bit, max, in ntrig_input_mapping() 550 struct hid_field *field, struct hid_usage *usage, in ntrig_input_mapped() argument 557 if (usage->type == EV_KEY || usage->type == EV_REL in ntrig_input_mapped() [all …]
|
D | hid-belkin.c | 28 #define belkin_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 31 struct hid_field *field, struct hid_usage *usage, in belkin_input_mapping() argument 36 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER || in belkin_input_mapping() 40 switch (usage->hid & HID_USAGE) { in belkin_input_mapping()
|
D | hid-topseed.c | 27 #define ts_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 30 struct hid_field *field, struct hid_usage *usage, in ts_input_mapping() argument 33 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) in ts_input_mapping() 36 switch (usage->hid & HID_USAGE) { in ts_input_mapping()
|
D | hid-twinhan.c | 61 #define th_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 64 struct hid_field *field, struct hid_usage *usage, in twinhan_input_mapping() argument 67 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_KEYBOARD) in twinhan_input_mapping() 70 switch (usage->hid & HID_USAGE) { in twinhan_input_mapping()
|
/drivers/staging/usbip/userspace/src/ |
D | usbip.c | 49 void (*usage)(void); member 57 .usage = NULL 63 .usage = NULL 69 .usage = usbip_attach_usage 75 .usage = usbip_detach_usage 81 .usage = usbip_list_usage 87 .usage = usbip_bind_usage 93 .usage = usbip_unbind_usage 106 if (!strcmp(cmds[i].name, argv[0]) && cmds[i].usage) { in usbip_help() 107 cmds[i].usage(); in usbip_help()
|
/drivers/hid/usbhid/ |
D | hid-pidff.c | 220 static void pidff_set(struct pidff_usage *usage, u16 value) in pidff_set() argument 222 usage->value[0] = pidff_rescale(value, 0xffff, usage->field); in pidff_set() 223 pr_debug("calculated from %d to %d\n", value, usage->value[0]); in pidff_set() 226 static void pidff_set_signed(struct pidff_usage *usage, s16 value) in pidff_set_signed() argument 228 if (usage->field->logical_minimum < 0) in pidff_set_signed() 229 usage->value[0] = pidff_rescale_signed(value, usage->field); in pidff_set_signed() 232 usage->value[0] = in pidff_set_signed() 233 pidff_rescale(-value, 0x8000, usage->field); in pidff_set_signed() 235 usage->value[0] = in pidff_set_signed() 236 pidff_rescale(value, 0x7fff, usage->field); in pidff_set_signed() [all …]
|