Lines Matching refs:usage
180 struct hid_usage *usage, __s32 value) in hidinput_apple_event() argument
187 if (usage->code == KEY_FN) { in hidinput_apple_event()
189 input_event(input, usage->type, usage->code, value); in hidinput_apple_event()
202 trans = apple_find_translation (table, usage->code); in hidinput_apple_event()
230 input_event(input, usage->type, code, value); in hidinput_apple_event()
235 (test_bit(usage->code, asc->pressed_numlock) || in hidinput_apple_event()
238 usage->code); in hidinput_apple_event()
242 set_bit(usage->code, in hidinput_apple_event()
245 clear_bit(usage->code, in hidinput_apple_event()
248 input_event(input, usage->type, trans->to, in hidinput_apple_event()
258 trans = apple_find_translation(apple_iso_keyboard, usage->code); in hidinput_apple_event()
260 input_event(input, usage->type, trans->to, value); in hidinput_apple_event()
267 trans = apple_find_translation(swapped_option_cmd_keys, usage->code); in hidinput_apple_event()
269 input_event(input, usage->type, trans->to, value); in hidinput_apple_event()
278 struct hid_usage *usage, __s32 value) in apple_event() argument
283 !usage->type) in apple_event()
287 usage->code == REL_HWHEEL) { in apple_event()
288 input_event(field->hidinput->input, usage->type, usage->code, in apple_event()
295 usage, value)) in apple_event()
347 struct hid_field *field, struct hid_usage *usage, in apple_input_mapping() argument
350 if (usage->hid == (HID_UP_CUSTOM | 0x0003)) { in apple_input_mapping()
353 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_FN); in apple_input_mapping()
363 struct hid_field *field, struct hid_usage *usage, in apple_input_mapped() argument
369 if (usage->hid == HID_GD_Z) in apple_input_mapped()
370 hid_map_usage(hi, usage, bit, max, EV_REL, REL_HWHEEL); in apple_input_mapped()
371 else if (usage->code == BTN_1) in apple_input_mapped()
372 hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_2); in apple_input_mapped()
373 else if (usage->code == BTN_2) in apple_input_mapped()
374 hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_1); in apple_input_mapped()