Lines Matching refs:usage
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()
162 struct hid_usage *usage, unsigned long **bit, int *max) in ms_surface_dial_quirk() argument
164 switch (usage->hid & HID_USAGE_PAGE) { in ms_surface_dial_quirk()
170 switch (usage->hid) { in ms_surface_dial_quirk()
183 struct hid_field *field, struct hid_usage *usage, in ms_input_mapping() argument
190 int ret = ms_ergonomy_kb_quirk(hi, usage, bit, max); in ms_input_mapping()
196 ms_presenter_8k_quirk(hi, usage, bit, max)) in ms_input_mapping()
200 int ret = ms_surface_dial_quirk(hi, field, usage, bit, max); in ms_input_mapping()
210 struct hid_field *field, struct hid_usage *usage, in ms_input_mapped() argument
217 clear_bit(usage->code, *bit); in ms_input_mapped()
223 struct hid_usage *usage, __s32 value) in ms_event() argument
230 !usage->type) in ms_event()
236 if (quirks & MS_ERGONOMY && usage->hid == (HID_UP_MSVENDOR | 0xff00)) { in ms_event()
244 if (quirks & MS_ERGONOMY && usage->hid == (HID_UP_MSVENDOR | 0xff01)) { in ms_event()
259 if (quirks & MS_ERGONOMY && usage->hid == (HID_UP_MSVENDOR | 0xff05)) { in ms_event()
270 input_event(input, usage->type, key, 1); in ms_event()
273 input_event(input, usage->type, last_key, 0); in ms_event()