/drivers/hid/ |
D | hid-input.c | 51 #define map_abs(c) hid_map_usage(hidinput, usage, &bit, &max, EV_ABS, (c)) 52 #define map_rel(c) hid_map_usage(hidinput, usage, &bit, &max, EV_REL, (c)) 53 #define map_key(c) hid_map_usage(hidinput, usage, &bit, &max, EV_KEY, (c)) 54 #define map_led(c) hid_map_usage(hidinput, usage, &bit, &max, EV_LED, (c)) 56 #define map_abs_clear(c) hid_map_usage_clear(hidinput, usage, &bit, \ 58 #define map_key_clear(c) hid_map_usage_clear(hidinput, usage, &bit, \ 61 static bool match_scancode(struct hid_usage *usage, in match_scancode() argument 64 return (usage->hid & (HID_USAGE_PAGE | HID_USAGE)) == scancode; in match_scancode() 67 static bool match_keycode(struct hid_usage *usage, in match_keycode() argument 73 return (usage->type == EV_KEY && usage->code == keycode); in match_keycode() [all …]
|
D | hid-a4tech.c | 35 struct hid_field *field, struct hid_usage *usage, in a4_input_mapping() argument 41 usage->hid == A4_WHEEL_ORIENTATION) { in a4_input_mapping() 57 struct hid_field *field, struct hid_usage *usage, in a4_input_mapped() argument 62 if (usage->type == EV_REL && usage->code == REL_WHEEL_HI_RES) { in a4_input_mapped() 67 if ((a4->quirks & A4_2WHEEL_MOUSE_HACK_7) && usage->hid == 0x00090007) in a4_input_mapped() 74 struct hid_usage *usage, __s32 value) in a4_event() argument 85 if (usage->type == EV_REL && usage->code == REL_WHEEL_HI_RES) { in a4_event() 90 if (usage->hid == A4_WHEEL_ORIENTATION) { in a4_event() 99 if ((a4->quirks & A4_2WHEEL_MOUSE_HACK_7) && usage->hid == 0x00090007) { in a4_event() 104 if (usage->code == REL_WHEEL_HI_RES && a4->hw_wheel) { in a4_event() [all …]
|
D | hid-microsoft.c | 78 #define ms_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 80 static int ms_ergonomy_kb_quirk(struct hid_input *hi, struct hid_usage *usage, in ms_ergonomy_kb_quirk() argument 85 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) { in ms_ergonomy_kb_quirk() 86 switch (usage->hid & HID_USAGE) { in ms_ergonomy_kb_quirk() 101 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR) in ms_ergonomy_kb_quirk() 104 switch (usage->hid & HID_USAGE) { in ms_ergonomy_kb_quirk() 115 hid_map_usage_clear(hi, usage, bit, max, EV_REL, REL_WHEEL); in ms_ergonomy_kb_quirk() 142 static int ms_presenter_8k_quirk(struct hid_input *hi, struct hid_usage *usage, in ms_presenter_8k_quirk() argument 145 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR) in ms_presenter_8k_quirk() 149 switch (usage->hid & HID_USAGE) { in ms_presenter_8k_quirk() [all …]
|
D | hid-gyration.c | 22 #define gy_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 25 struct hid_field *field, struct hid_usage *usage, in gyration_input_mapping() argument 28 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) in gyration_input_mapping() 32 switch (usage->hid & HID_USAGE) { in gyration_input_mapping() 55 struct hid_usage *usage, __s32 value) in gyration_event() argument 61 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK && in gyration_event() 62 (usage->hid & 0xff) == 0x82) { in gyration_event() 64 input_event(input, usage->type, usage->code, 1); in gyration_event() 66 input_event(input, usage->type, usage->code, 0); in gyration_event()
|
D | hid-ezkey.c | 22 #define ez_map_rel(c) hid_map_usage(hi, usage, bit, max, EV_REL, (c)) 23 #define ez_map_key(c) hid_map_usage(hi, usage, bit, max, EV_KEY, (c)) 26 struct hid_field *field, struct hid_usage *usage, in ez_input_mapping() argument 29 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) in ez_input_mapping() 32 switch (usage->hid & HID_USAGE) { in ez_input_mapping() 48 struct hid_usage *usage, __s32 value) in ez_event() argument 51 !usage->type) in ez_event() 55 if (usage->type == EV_REL && usage->code == REL_HWHEEL) { in ez_event() 57 input_event(input, usage->type, REL_WHEEL, -value); in ez_event()
|
D | hid-apple.c | 222 struct hid_usage *usage, __s32 value) in hidinput_apple_event() argument 231 if (usage->code == fn_keycode) { in hidinput_apple_event() 233 input_event_with_scancode(input, usage->type, KEY_FN, in hidinput_apple_event() 234 usage->hid, value); in hidinput_apple_event() 249 trans = apple_find_translation (table, usage->code); in hidinput_apple_event() 277 input_event_with_scancode(input, usage->type, code, in hidinput_apple_event() 278 usage->hid, value); in hidinput_apple_event() 283 (test_bit(usage->code, asc->pressed_numlock) || in hidinput_apple_event() 286 usage->code); in hidinput_apple_event() 290 set_bit(usage->code, in hidinput_apple_event() [all …]
|
D | hid-lenovo.c | 62 #define map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c)) 140 struct hid_usage *usage, unsigned long **bit, int *max) in lenovo_input_mapping_tpkbd() argument 142 if (usage->hid == (HID_UP_BUTTON | 0x0010)) { in lenovo_input_mapping_tpkbd() 153 struct hid_usage *usage, unsigned long **bit, int *max) in lenovo_input_mapping_cptkbd() argument 156 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_MSVENDOR || in lenovo_input_mapping_cptkbd() 157 (usage->hid & HID_USAGE_PAGE) == HID_UP_LNVENDOR) { in lenovo_input_mapping_cptkbd() 158 switch (usage->hid & HID_USAGE) { in lenovo_input_mapping_cptkbd() 194 if (usage->hid == HID_GD_WHEEL) in lenovo_input_mapping_cptkbd() 196 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON && in lenovo_input_mapping_cptkbd() 197 (usage->hid & HID_USAGE) == 0x003) in lenovo_input_mapping_cptkbd() [all …]
|
D | hid-icade.c | 165 struct hid_usage *usage, __s32 value) in icade_event() argument 170 !usage->type) in icade_event() 177 trans = icade_find_translation(usage->hid & HID_USAGE); in icade_event() 182 input_event(field->hidinput->input, usage->type, in icade_event() 189 struct hid_field *field, struct hid_usage *usage, in icade_input_mapping() argument 194 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_KEYBOARD) { in icade_input_mapping() 195 trans = icade_find_translation(usage->hid & HID_USAGE); in icade_input_mapping() 200 hid_map_usage(hi, usage, bit, max, EV_KEY, trans->to); in icade_input_mapping() 212 struct hid_field *field, struct hid_usage *usage, in icade_input_mapped() argument 215 if (usage->type == EV_KEY) in icade_input_mapped() [all …]
|
D | hid-lg.c | 535 #define lg_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 539 struct hid_usage *usage, unsigned long **bit, int *max) in lg_ultrax_remote_mapping() argument 541 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) in lg_ultrax_remote_mapping() 545 switch (usage->hid & HID_USAGE) { in lg_ultrax_remote_mapping() 571 static int lg_wireless_mapping(struct hid_input *hi, struct hid_usage *usage, in lg_wireless_mapping() argument 574 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) in lg_wireless_mapping() 577 switch (usage->hid & HID_USAGE) { in lg_wireless_mapping() 633 struct hid_field *field, struct hid_usage *usage, in lg_input_mapping() argument 649 unsigned int hid = usage->hid; in lg_input_mapping() 652 lg_ultrax_remote_mapping(hi, usage, bit, max)) in lg_input_mapping() [all …]
|
D | hid-multitouch.c | 481 struct hid_field *field, struct hid_usage *usage) in mt_feature_mapping() argument 485 switch (usage->hid) { in mt_feature_mapping() 499 if (usage->usage_index >= field->report_count) { in mt_feature_mapping() 505 if (field->value[usage->usage_index] == MT_BUTTONTYPE_CLICKPAD) in mt_feature_mapping() 511 if (usage->usage_index == 0) in mt_feature_mapping() 530 struct mt_usages *usage; in mt_allocate_usage() local 532 usage = devm_kzalloc(&hdev->dev, sizeof(*usage), GFP_KERNEL); in mt_allocate_usage() 533 if (!usage) in mt_allocate_usage() 537 usage->x = DEFAULT_ZERO; in mt_allocate_usage() 538 usage->y = DEFAULT_ZERO; in mt_allocate_usage() [all …]
|
D | hid-plantronics.c | 38 (usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) 53 struct hid_usage *usage, in plantronics_input_mapping() argument 87 switch (usage->hid) { in plantronics_input_mapping() 110 usage->hid, field->application); in plantronics_input_mapping() 114 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, mapped_key); in plantronics_input_mapping() 116 usage->hid, field->application, mapped_key); in plantronics_input_mapping() 121 struct hid_usage *usage, __s32 value) in plantronics_event() argument 155 col_page = hdev->collection[i].usage & HID_USAGE_PAGE; in plantronics_device_type() 157 plt_type = hdev->collection[i].usage; in plantronics_device_type() 161 plt_type = hdev->collection[i].usage; in plantronics_device_type()
|
D | hid-jabra.c | 22 struct hid_usage *usage, in jabra_input_mapping() argument 26 ((usage->hid & HID_USAGE_PAGE) >= HID_UP_VENDOR_DEFINED_MIN && in jabra_input_mapping() 27 (usage->hid & HID_USAGE_PAGE) <= HID_UP_VENDOR_DEFINED_MAX); in jabra_input_mapping() 30 usage->hid, in jabra_input_mapping() 32 usage->collection_index, in jabra_input_mapping() 33 usage->usage_index, in jabra_input_mapping()
|
D | hid-ite.c | 43 struct hid_usage *usage, unsigned long **bit, in ite_input_mapping() argument 50 (usage->hid & HID_USAGE_PAGE) == 0x00880000) { in ite_input_mapping() 51 if (usage->hid == 0x00880078) { in ite_input_mapping() 53 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_F22); in ite_input_mapping() 56 if (usage->hid == 0x00880079) { in ite_input_mapping() 58 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_F23); in ite_input_mapping() 68 struct hid_usage *usage, __s32 value) in ite_event() argument 82 if (usage->hid == HID_GD_RFKILL_BTN) { in ite_event()
|
D | hid-cypress.c | 84 struct hid_field *field, struct hid_usage *usage, in cp_input_mapped() argument 92 if (usage->type == EV_REL && usage->code == REL_WHEEL) in cp_input_mapped() 94 if (usage->hid == 0x00090005) in cp_input_mapped() 101 struct hid_usage *usage, __s32 value) in cp_event() argument 106 !usage->type || !(quirks & CP_2WHEEL_MOUSE_HACK)) in cp_event() 109 if (usage->hid == 0x00090005) { in cp_event() 118 if (usage->code == REL_WHEEL && (quirks & CP_2WHEEL_MOUSE_HACK_ON)) { in cp_event() 121 input_event(input, usage->type, REL_HWHEEL, value); in cp_event()
|
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() 606 struct hid_usage *usage, __s32 value) in corsair_event() argument 613 switch (usage->hid & HID_USAGE) { in corsair_event() 630 struct hid_usage *usage, unsigned long **bit, in corsair_input_mapping() argument 635 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_KEYBOARD) in corsair_input_mapping() 638 gkey = corsair_usage_to_gkey(usage->hid & HID_USAGE); in corsair_input_mapping() [all …]
|
D | hid-petalynx.c | 35 #define pl_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 38 struct hid_field *field, struct hid_usage *usage, in pl_input_mapping() argument 41 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_LOGIVENDOR) { in pl_input_mapping() 42 switch (usage->hid & HID_USAGE) { in pl_input_mapping() 54 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) { in pl_input_mapping() 55 switch (usage->hid & HID_USAGE) { in pl_input_mapping()
|
D | hid-core.c | 110 field->usage = (struct hid_usage *)(field + 1); in hid_register_field() 111 field->value = (s32 *)(field->usage + usages); in hid_register_field() 124 unsigned usage; in open_collection() local 127 usage = parser->local.usage[0]; in open_collection() 171 collection->usage = usage; in open_collection() 209 return collection[index].usage; in hid_lookup_collection() 221 parser->local.usage[index] &= 0xFFFF; in complete_usage() 222 parser->local.usage[index] |= in complete_usage() 230 static int hid_add_usage(struct hid_parser *parser, unsigned usage, u8 size) in hid_add_usage() argument 236 parser->local.usage[parser->local.usage_index] = usage; in hid_add_usage() [all …]
|
D | hid-tivo.c | 19 #define tivo_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ 23 struct hid_field *field, struct hid_usage *usage, in tivo_input_mapping() argument 26 switch (usage->hid & HID_USAGE_PAGE) { in tivo_input_mapping() 28 switch (usage->hid & HID_USAGE) { in tivo_input_mapping() 42 switch (usage->hid & HID_USAGE) { in tivo_input_mapping()
|
D | wacom_wac.c | 1860 static int wacom_offset_rotation(struct input_dev *input, struct hid_usage *usage, in wacom_offset_rotation() argument 1863 struct input_absinfo *abs = &input->absinfo[usage->code]; in wacom_offset_rotation() 1874 int wacom_equivalent_usage(int usage) in wacom_equivalent_usage() argument 1876 if ((usage & HID_USAGE_PAGE) == WACOM_HID_UP_WACOMDIGITIZER) { in wacom_equivalent_usage() 1877 int subpage = (usage & 0xFF00) << 8; in wacom_equivalent_usage() 1878 int subusage = (usage & 0xFF); in wacom_equivalent_usage() 1884 usage == WACOM_HID_WD_SENSE || in wacom_equivalent_usage() 1885 usage == WACOM_HID_WD_SERIALHI || in wacom_equivalent_usage() 1886 usage == WACOM_HID_WD_TOOLTYPE || in wacom_equivalent_usage() 1887 usage == WACOM_HID_WD_DISTANCE || in wacom_equivalent_usage() [all …]
|
D | hid-samsung.c | 93 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c)) 96 struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, in samsung_kbd_mouse_input_mapping() argument 102 if (1 != ifnum || HID_UP_CONSUMER != (usage->hid & HID_USAGE_PAGE)) in samsung_kbd_mouse_input_mapping() 106 usage->hid & HID_USAGE); in samsung_kbd_mouse_input_mapping() 108 switch (usage->hid & HID_USAGE) { in samsung_kbd_mouse_input_mapping() 137 struct hid_field *field, struct hid_usage *usage, in samsung_input_mapping() argument 144 hi, field, usage, bit, max); in samsung_input_mapping()
|
D | hid-penmount.c | 20 struct hid_usage *usage, unsigned long **bit, int *max) in penmount_input_mapping() argument 22 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) { in penmount_input_mapping() 23 if (((usage->hid - 1) & HID_USAGE) == 0) { in penmount_input_mapping() 24 hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH); in penmount_input_mapping()
|
D | hid-xinmo.c | 26 struct hid_usage *usage, __s32 value) in xinmo_event() argument 28 switch (usage->code) { in xinmo_event() 34 input_event(field->hidinput->input, usage->type, in xinmo_event() 35 usage->code, -1); in xinmo_event()
|
D | hid-kensington.c | 18 #define ks_map_key(c) hid_map_usage(hi, usage, bit, max, EV_KEY, (c)) 21 struct hid_field *field, struct hid_usage *usage, in ks_input_mapping() argument 24 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR) in ks_input_mapping() 27 switch (usage->hid & HID_USAGE) { in ks_input_mapping()
|
D | hid-gfrm.c | 28 struct hid_field *field, struct hid_usage *usage, in gfrm_input_mapping() argument 34 if (usage->hid == (HID_UP_CONSUMER | 0x4)) { in gfrm_input_mapping() 36 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_INFO); in gfrm_input_mapping() 40 if (usage->hid == (HID_UP_CONSUMER | 0x41)) { in gfrm_input_mapping() 42 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_OK); in gfrm_input_mapping()
|
/drivers/leds/trigger/ |
D | ledtrig-activity.c | 39 unsigned int usage; in led_activity_function() local 85 usage = 0; in led_activity_function() 87 usage = 100; in led_activity_function() 89 usage = 100 * diff_used / diff_boot; in led_activity_function() 137 if (usage < target) in led_activity_function() 140 990 - 900 * usage / target; /* OFF */ in led_activity_function() 143 10 + 80 * (usage - target) / (100 - target) : /* ON */ in led_activity_function() 144 90 - 80 * (usage - target) / (100 - target); /* OFF */ in led_activity_function()
|