• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/hid/

Lines Matching refs:code

71 static inline int match_scancode(unsigned int code, unsigned int scancode)
76 return (code & (HID_USAGE_PAGE | HID_USAGE)) == scancode;
79 static inline int match_keycode(unsigned int code, unsigned int keycode)
84 return code == keycode;
102 match_keycode(usage->code, keycode))
119 *keycode = usage->code;
134 old_keycode = usage->code;
135 usage->code = keycode;
138 set_bit(usage->code, dev->keybit);
139 dbg_hid(KERN_DEBUG "Assigned keycode %d to HID usage code %x\n", keycode, scancode);
157 int max = 0, code;
196 code = ((usage->hid - 1) & HID_USAGE);
200 case HID_GD_POINTER: code += 0x110; break;
202 if (code <= 0xf)
203 code += BTN_JOYSTICK;
205 code += BTN_TRIGGER_HAPPY;
207 case HID_GD_GAMEPAD: code += 0x130; break;
211 case HID_GD_POINTER: code += 0x110; break;
212 case HID_GD_JOYSTICK: code += 0x120; break;
213 case HID_GD_GAMEPAD: code += 0x130; break;
214 default: code += 0x100;
218 map_key(code);
519 while (usage->code <= max && test_and_set_bit(usage->code, bit))
520 usage->code = find_next_zero_bit(bit, max + 1, usage->code);
522 if (usage->code > max)
531 if ((device->quirks & HID_QUIRK_BADPAD) && (usage->code == ABS_X || usage->code == ABS_Y)) {
537 input_set_abs_params(input, usage->code, a, b, (b - a) >> 8, (b - a) >> 4);
538 else input_set_abs_params(input, usage->code, a, b, 0, 0);
541 if (usage->code == ABS_MT_POSITION_X && input->hint_events_per_packet == 0)
548 for (i = usage->code; i < usage->code + 2 && i <= max; i++) {
553 field->dpad = usage->code;
561 (usage->code == ABS_VOLUME)) {
594 input_event(input, usage->type, usage->code , hid_hat_to_axis[hat_dir].x);
595 input_event(input, usage->type, usage->code + 1, hid_hat_to_axis[hat_dir].y);
606 input_event(input, usage->type, (*quirks & HID_QUIRK_INVERT) ? BTN_TOOL_RUBBER : usage->code, 1);
609 input_event(input, usage->type, usage->code, 0);
630 if ((usage->type == EV_KEY) && (usage->code == 0)) /* Key 0 is "unassigned", not KEY_UNKNOWN */
634 (usage->code == ABS_VOLUME)) {
648 /* report the usage code as scancode if the key status has changed */
649 if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
652 input_event(input, usage->type, usage->code, value);
655 input_event(input, usage->type, usage->code, 0);
667 int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field)
676 if ((*field)->usage[j].type == type && (*field)->usage[j].code == code)