/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-microsoft.c | 50 #define ms_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 52 static int ms_ergonomy_kb_quirk(struct hid_input *hi, struct hid_usage *usage, in ms_ergonomy_kb_quirk() argument 57 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) { in ms_ergonomy_kb_quirk() 58 switch (usage->hid & HID_USAGE) { in ms_ergonomy_kb_quirk() 73 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR) in ms_ergonomy_kb_quirk() 76 switch (usage->hid & HID_USAGE) { in ms_ergonomy_kb_quirk() 87 hid_map_usage_clear(hi, usage, bit, max, EV_REL, REL_WHEEL); in ms_ergonomy_kb_quirk() 114 static int ms_presenter_8k_quirk(struct hid_input *hi, struct hid_usage *usage, in ms_presenter_8k_quirk() argument 117 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR) in ms_presenter_8k_quirk() 121 switch (usage->hid & HID_USAGE) { in ms_presenter_8k_quirk() [all …]
|
D | hid-lg.c | 481 #define lg_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 485 struct hid_usage *usage, unsigned long **bit, int *max) in lg_ultrax_remote_mapping() argument 487 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) in lg_ultrax_remote_mapping() 491 switch (usage->hid & HID_USAGE) { in lg_ultrax_remote_mapping() 517 static int lg_dinovo_mapping(struct hid_input *hi, struct hid_usage *usage, in lg_dinovo_mapping() argument 520 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) in lg_dinovo_mapping() 523 switch (usage->hid & HID_USAGE) { in lg_dinovo_mapping() 533 static int lg_wireless_mapping(struct hid_input *hi, struct hid_usage *usage, in lg_wireless_mapping() argument 536 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) in lg_wireless_mapping() 539 switch (usage->hid & HID_USAGE) { in lg_wireless_mapping() [all …]
|
D | hid-gyration.c | 25 #define gy_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 28 struct hid_field *field, struct hid_usage *usage, in gyration_input_mapping() argument 31 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) in gyration_input_mapping() 35 switch (usage->hid & HID_USAGE) { in gyration_input_mapping() 58 struct hid_usage *usage, __s32 value) in gyration_event() argument 64 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK && in gyration_event() 65 (usage->hid & 0xff) == 0x82) { in gyration_event() 67 input_event(input, usage->type, usage->code, 1); in gyration_event() 69 input_event(input, usage->type, usage->code, 0); in gyration_event()
|
D | hid-a4tech.c | 38 struct hid_field *field, struct hid_usage *usage, in a4_input_mapping() argument 44 usage->hid == A4_WHEEL_ORIENTATION) { in a4_input_mapping() 60 struct hid_field *field, struct hid_usage *usage, in a4_input_mapped() argument 65 if (usage->type == EV_REL && usage->code == REL_WHEEL) in a4_input_mapped() 68 if ((a4->quirks & A4_2WHEEL_MOUSE_HACK_7) && usage->hid == 0x00090007) in a4_input_mapped() 75 struct hid_usage *usage, __s32 value) in a4_event() argument 86 if (usage->type == EV_REL && usage->code == REL_WHEEL) { in a4_event() 91 if (usage->hid == A4_WHEEL_ORIENTATION) { in a4_event() 98 if ((a4->quirks & A4_2WHEEL_MOUSE_HACK_7) && usage->hid == 0x00090007) { in a4_event() 103 if (usage->code == REL_WHEEL && a4->hw_wheel) { in a4_event() [all …]
|
D | hid-ezkey.c | 25 #define ez_map_rel(c) hid_map_usage(hi, usage, bit, max, EV_REL, (c)) 26 #define ez_map_key(c) hid_map_usage(hi, usage, bit, max, EV_KEY, (c)) 29 struct hid_field *field, struct hid_usage *usage, in ez_input_mapping() argument 32 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) in ez_input_mapping() 35 switch (usage->hid & HID_USAGE) { in ez_input_mapping() 51 struct hid_usage *usage, __s32 value) in ez_event() argument 54 !usage->type) in ez_event() 58 if (usage->type == EV_REL && usage->code == REL_HWHEEL) { in ez_event() 60 input_event(input, usage->type, REL_WHEEL, -value); in ez_event()
|
D | hid-icade.c | 168 struct hid_usage *usage, __s32 value) in icade_event() argument 173 !usage->type) in icade_event() 180 trans = icade_find_translation(usage->hid & HID_USAGE); in icade_event() 185 input_event(field->hidinput->input, usage->type, in icade_event() 192 struct hid_field *field, struct hid_usage *usage, in icade_input_mapping() argument 197 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_KEYBOARD) { in icade_input_mapping() 198 trans = icade_find_translation(usage->hid & HID_USAGE); in icade_input_mapping() 203 hid_map_usage(hi, usage, bit, max, EV_KEY, trans->to); in icade_input_mapping() 215 struct hid_field *field, struct hid_usage *usage, in icade_input_mapped() argument 218 if (usage->type == EV_KEY) in icade_input_mapped() [all …]
|
D | hid-apple.c | 182 struct hid_usage *usage, __s32 value) in hidinput_apple_event() argument 189 if (usage->code == KEY_FN) { in hidinput_apple_event() 191 input_event(input, usage->type, usage->code, value); in hidinput_apple_event() 204 trans = apple_find_translation (table, usage->code); in hidinput_apple_event() 232 input_event(input, usage->type, code, value); in hidinput_apple_event() 237 (test_bit(usage->code, asc->pressed_numlock) || in hidinput_apple_event() 240 usage->code); in hidinput_apple_event() 244 set_bit(usage->code, in hidinput_apple_event() 247 clear_bit(usage->code, in hidinput_apple_event() 250 input_event(input, usage->type, trans->to, in hidinput_apple_event() [all …]
|
D | hid-multitouch.c | 388 struct hid_field *field, struct hid_usage *usage) in mt_feature_mapping() argument 392 switch (usage->hid) { in mt_feature_mapping() 395 if (usage->usage_index >= field->report_count) { in mt_feature_mapping() 402 td->inputmode_index = usage->usage_index; in mt_feature_mapping() 429 if (usage->usage_index >= field->report_count) { in mt_feature_mapping() 435 if (field->value[usage->usage_index] == MT_BUTTONTYPE_CLICKPAD) in mt_feature_mapping() 441 if (usage->usage_index == 0) in mt_feature_mapping() 457 static void mt_store_field(struct hid_usage *usage, struct mt_device *td, in mt_store_field() argument 465 f->usages[f->length++] = usage->hid; in mt_store_field() 469 struct hid_field *field, struct hid_usage *usage, in mt_touch_input_mapping() argument [all …]
|
D | hid-lenovo.c | 56 #define map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c)) 89 struct hid_usage *usage, unsigned long **bit, int *max) in lenovo_input_mapping_tpkbd() argument 91 if (usage->hid == (HID_UP_BUTTON | 0x0010)) { in lenovo_input_mapping_tpkbd() 102 struct hid_usage *usage, unsigned long **bit, int *max) in lenovo_input_mapping_cptkbd() argument 105 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_MSVENDOR || in lenovo_input_mapping_cptkbd() 106 (usage->hid & HID_USAGE_PAGE) == HID_UP_LNVENDOR) { in lenovo_input_mapping_cptkbd() 107 switch (usage->hid & HID_USAGE) { in lenovo_input_mapping_cptkbd() 143 if (usage->hid == HID_GD_WHEEL) in lenovo_input_mapping_cptkbd() 145 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON && in lenovo_input_mapping_cptkbd() 146 (usage->hid & HID_USAGE) == 0x003) in lenovo_input_mapping_cptkbd() [all …]
|
D | hid-cypress.c | 55 struct hid_field *field, struct hid_usage *usage, in cp_input_mapped() argument 63 if (usage->type == EV_REL && usage->code == REL_WHEEL) in cp_input_mapped() 65 if (usage->hid == 0x00090005) in cp_input_mapped() 72 struct hid_usage *usage, __s32 value) in cp_event() argument 77 !usage->type || !(quirks & CP_2WHEEL_MOUSE_HACK)) in cp_event() 80 if (usage->hid == 0x00090005) { in cp_event() 89 if (usage->code == REL_WHEEL && (quirks & CP_2WHEEL_MOUSE_HACK_ON)) { in cp_event() 92 input_event(input, usage->type, REL_HWHEEL, value); in cp_event()
|
D | hid-plantronics.c | 40 (usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) 45 struct hid_usage *usage, in plantronics_input_mapping() argument 78 switch (usage->hid) { in plantronics_input_mapping() 101 usage->hid, field->application); in plantronics_input_mapping() 105 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, mapped_key); in plantronics_input_mapping() 107 usage->hid, field->application, mapped_key); in plantronics_input_mapping() 122 col_page = hdev->collection[i].usage & HID_USAGE_PAGE; in plantronics_device_type() 124 plt_type = hdev->collection[i].usage; in plantronics_device_type() 128 plt_type = hdev->collection[i].usage; in plantronics_device_type()
|
D | hid-corsair.c | 48 static int corsair_usage_to_gkey(unsigned int usage) in corsair_usage_to_gkey() argument 51 if (usage >= 0xd0 && usage <= 0xdf) in corsair_usage_to_gkey() 52 return usage - 0xd0 + 1; in corsair_usage_to_gkey() 54 if (usage >= 0xe8 && usage <= 0xe9) in corsair_usage_to_gkey() 55 return usage - 0xe8 + 17; in corsair_usage_to_gkey() 601 struct hid_usage *usage, __s32 value) in corsair_event() argument 608 switch (usage->hid & HID_USAGE) { in corsair_event() 625 struct hid_usage *usage, unsigned long **bit, in corsair_input_mapping() argument 630 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_KEYBOARD) in corsair_input_mapping() 633 gkey = corsair_usage_to_gkey(usage->hid & HID_USAGE); in corsair_input_mapping() [all …]
|
D | hid-petalynx.c | 38 #define pl_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 41 struct hid_field *field, struct hid_usage *usage, in pl_input_mapping() argument 44 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_LOGIVENDOR) { in pl_input_mapping() 45 switch (usage->hid & HID_USAGE) { in pl_input_mapping() 57 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) { in pl_input_mapping() 58 switch (usage->hid & HID_USAGE) { in pl_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-samsung.c | 98 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c)) 101 struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, in samsung_kbd_mouse_input_mapping() argument 107 if (1 != ifnum || HID_UP_CONSUMER != (usage->hid & HID_USAGE_PAGE)) in samsung_kbd_mouse_input_mapping() 111 usage->hid & HID_USAGE); in samsung_kbd_mouse_input_mapping() 113 switch (usage->hid & HID_USAGE) { in samsung_kbd_mouse_input_mapping() 142 struct hid_field *field, struct hid_usage *usage, in samsung_input_mapping() argument 149 hi, field, usage, bit, max); in samsung_input_mapping()
|
D | wacom_wac.c | 1673 static int wacom_offset_rotation(struct input_dev *input, struct hid_usage *usage, in wacom_offset_rotation() argument 1676 struct input_absinfo *abs = &input->absinfo[usage->code]; in wacom_offset_rotation() 1687 int wacom_equivalent_usage(int usage) in wacom_equivalent_usage() argument 1689 if ((usage & HID_USAGE_PAGE) == WACOM_HID_UP_WACOMDIGITIZER) { in wacom_equivalent_usage() 1690 int subpage = (usage & 0xFF00) << 8; in wacom_equivalent_usage() 1691 int subusage = (usage & 0xFF); in wacom_equivalent_usage() 1697 usage == WACOM_HID_WD_SENSE || in wacom_equivalent_usage() 1698 usage == WACOM_HID_WD_SERIALHI || in wacom_equivalent_usage() 1699 usage == WACOM_HID_WD_TOOLTYPE || in wacom_equivalent_usage() 1700 usage == WACOM_HID_WD_DISTANCE || in wacom_equivalent_usage() [all …]
|
D | hid-xinmo.c | 29 struct hid_usage *usage, __s32 value) in xinmo_event() argument 31 switch (usage->code) { in xinmo_event() 37 input_event(field->hidinput->input, usage->type, in xinmo_event() 38 usage->code, -1); in xinmo_event()
|
D | hid-penmount.c | 23 struct hid_usage *usage, unsigned long **bit, int *max) in penmount_input_mapping() argument 25 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) { in penmount_input_mapping() 26 if (((usage->hid - 1) & HID_USAGE) == 0) { in penmount_input_mapping() 27 hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH); in penmount_input_mapping()
|
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-saitek.c | 155 struct hid_usage *usage, __s32 value) in saitek_event() argument 160 if (usage->type == EV_KEY && value && in saitek_event() 162 usage->code - BTN_MOUSE == 10) || in saitek_event() 164 usage->code - BTN_MOUSE == 15))) { in saitek_event() 166 input_report_key(input, usage->code, 1); in saitek_event() 169 input_report_key(input, usage->code, 0); in saitek_event()
|
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) != HID_UP_LOGIVENDOR) in ts_input_mapping() 30 switch (usage->hid & HID_USAGE) { in ts_input_mapping()
|
D | hid-gfrm.c | 32 struct hid_field *field, struct hid_usage *usage, in gfrm_input_mapping() argument 38 if (usage->hid == (HID_UP_CONSUMER | 0x4)) { in gfrm_input_mapping() 40 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_INFO); in gfrm_input_mapping() 44 if (usage->hid == (HID_UP_CONSUMER | 0x41)) { in gfrm_input_mapping() 46 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_OK); in gfrm_input_mapping()
|
/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_vram_mgr.c | 31 atomic64_t usage; member 141 uint64_t usage = 0, vis_usage = 0; in amdgpu_vram_mgr_new() local 187 usage += nodes[i].size << PAGE_SHIFT; in amdgpu_vram_mgr_new() 203 atomic64_add(usage, &mgr->usage); in amdgpu_vram_mgr_new() 235 uint64_t usage = 0, vis_usage = 0; in amdgpu_vram_mgr_del() local 245 usage += nodes->size << PAGE_SHIFT; in amdgpu_vram_mgr_del() 251 atomic64_sub(usage, &mgr->usage); in amdgpu_vram_mgr_del() 269 return atomic64_read(&mgr->usage); in amdgpu_vram_mgr_usage()
|
/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum_cnt.c | 51 unsigned long *usage; /* Usage bitmap */ member 125 pool->usage = kzalloc(map_size, GFP_KERNEL); in mlxsw_sp_counter_pool_init() 126 if (!pool->usage) { in mlxsw_sp_counter_pool_init() 159 WARN_ON(find_first_bit(pool->usage, pool->pool_size) != in mlxsw_sp_counter_pool_fini() 161 kfree(pool->usage); in mlxsw_sp_counter_pool_fini() 179 entry_index = find_next_zero_bit(pool->usage, stop_index, entry_index); in mlxsw_sp_counter_alloc() 188 __set_bit(entry_index + i, pool->usage); in mlxsw_sp_counter_alloc() 206 __clear_bit(counter_index + i, pool->usage); in mlxsw_sp_counter_free()
|