Lines Matching refs:usage
181 struct hid_usage *usage, __s32 value) in hidinput_apple_event() argument
186 if (usage->code == KEY_FN) { in hidinput_apple_event()
188 input_event(input, usage->type, usage->code, value); in hidinput_apple_event()
203 trans = apple_find_translation (table, usage->code); in hidinput_apple_event()
206 if (test_bit(usage->code, asc->pressed_fn)) in hidinput_apple_event()
216 set_bit(usage->code, asc->pressed_fn); in hidinput_apple_event()
218 clear_bit(usage->code, asc->pressed_fn); in hidinput_apple_event()
220 input_event(input, usage->type, trans->to, in hidinput_apple_event()
228 (test_bit(usage->code, asc->pressed_numlock) || in hidinput_apple_event()
231 usage->code); in hidinput_apple_event()
235 set_bit(usage->code, in hidinput_apple_event()
238 clear_bit(usage->code, in hidinput_apple_event()
241 input_event(input, usage->type, trans->to, in hidinput_apple_event()
251 trans = apple_find_translation(apple_iso_keyboard, usage->code); in hidinput_apple_event()
253 input_event(input, usage->type, trans->to, value); in hidinput_apple_event()
260 trans = apple_find_translation(swapped_option_cmd_keys, usage->code); in hidinput_apple_event()
262 input_event(input, usage->type, trans->to, value); in hidinput_apple_event()
271 struct hid_usage *usage, __s32 value) in apple_event() argument
276 !usage->type) in apple_event()
280 usage->code == REL_HWHEEL) { in apple_event()
281 input_event(field->hidinput->input, usage->type, usage->code, in apple_event()
288 usage, value)) in apple_event()
333 struct hid_field *field, struct hid_usage *usage, in apple_input_mapping() argument
336 if (usage->hid == (HID_UP_CUSTOM | 0x0003)) { in apple_input_mapping()
339 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_FN); in apple_input_mapping()
349 struct hid_field *field, struct hid_usage *usage, in apple_input_mapped() argument
355 if (usage->hid == HID_GD_Z) in apple_input_mapped()
356 hid_map_usage(hi, usage, bit, max, EV_REL, REL_HWHEEL); in apple_input_mapped()
357 else if (usage->code == BTN_1) in apple_input_mapped()
358 hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_2); in apple_input_mapped()
359 else if (usage->code == BTN_2) in apple_input_mapped()
360 hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_1); in apple_input_mapped()