Lines Matching refs:usage

183 		struct hid_usage *usage, __s32 value)  in hidinput_apple_event()  argument
188 if (usage->code == KEY_FN) { in hidinput_apple_event()
190 input_event(input, usage->type, usage->code, value); in hidinput_apple_event()
205 trans = apple_find_translation (table, usage->code); in hidinput_apple_event()
208 if (test_bit(usage->code, asc->pressed_fn)) in hidinput_apple_event()
218 set_bit(usage->code, asc->pressed_fn); in hidinput_apple_event()
220 clear_bit(usage->code, asc->pressed_fn); in hidinput_apple_event()
222 input_event(input, usage->type, trans->to, in hidinput_apple_event()
230 (test_bit(usage->code, asc->pressed_numlock) || in hidinput_apple_event()
233 usage->code); in hidinput_apple_event()
237 set_bit(usage->code, in hidinput_apple_event()
240 clear_bit(usage->code, in hidinput_apple_event()
243 input_event(input, usage->type, trans->to, in hidinput_apple_event()
253 trans = apple_find_translation(apple_iso_keyboard, usage->code); in hidinput_apple_event()
255 input_event(input, usage->type, trans->to, value); in hidinput_apple_event()
262 trans = apple_find_translation(swapped_option_cmd_keys, usage->code); in hidinput_apple_event()
264 input_event(input, usage->type, trans->to, value); in hidinput_apple_event()
273 struct hid_usage *usage, __s32 value) in apple_event() argument
278 !usage->type) in apple_event()
282 usage->code == REL_HWHEEL) { in apple_event()
283 input_event(field->hidinput->input, usage->type, usage->code, in apple_event()
290 usage, value)) in apple_event()
335 struct hid_field *field, struct hid_usage *usage, in apple_input_mapping() argument
338 if (usage->hid == (HID_UP_CUSTOM | 0x0003) || in apple_input_mapping()
339 usage->hid == (HID_UP_MSVENDOR | 0x0003)) { in apple_input_mapping()
342 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_FN); in apple_input_mapping()
352 struct hid_field *field, struct hid_usage *usage, in apple_input_mapped() argument
358 if (usage->hid == HID_GD_Z) in apple_input_mapped()
359 hid_map_usage(hi, usage, bit, max, EV_REL, REL_HWHEEL); in apple_input_mapped()
360 else if (usage->code == BTN_1) in apple_input_mapped()
361 hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_2); in apple_input_mapped()
362 else if (usage->code == BTN_2) in apple_input_mapped()
363 hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_1); in apple_input_mapped()