Lines Matching defs:code
37 MODULE_PARM_DESC(set, "Select keyboard code set (2 = default, 3 = PS/2 native)");
352 static bool atkbd_need_xlate(unsigned long xl_bit, unsigned char code)
356 if (code == ATKBD_RET_EMUL0 || code == ATKBD_RET_EMUL1)
360 if (code == xl_table[i])
371 static void atkbd_calculate_xl_bit(struct atkbd *atkbd, unsigned char code)
376 if (!((code ^ xl_table[i]) & 0x7f)) {
377 if (code & 0x80)
390 static unsigned int atkbd_compat_scancode(struct atkbd *atkbd, unsigned int code)
394 code |= 0x100;
396 code = (code & 0x7f) | ((code & 0x80) << 1);
398 code |= 0x80;
401 return code;
414 unsigned int code = data;
446 input_event(dev, EV_MSC, MSC_RAW, code);
449 code = atkbd_platform_scancode_fixup(atkbd, code);
453 if (atkbd->emul || atkbd_need_xlate(atkbd->xl_bit, code)) {
454 atkbd->release = code >> 7;
455 code &= 0x7f;
462 switch (code) {
491 code = atkbd_compat_scancode(atkbd, code);
496 keycode = atkbd->keycode[code];
498 if (!(atkbd->release && test_bit(code, atkbd->force_release_mask)))
500 input_event(dev, EV_MSC, MSC_SCAN, code);
507 "Unknown key %s (%s set %d, code %#x on %s).\n",
510 atkbd->set, code, serio->phys);
513 code & 0x80 ? "e0" : "", code & 0x7f);
543 value = time_before(jiffies, atkbd->time) && atkbd->last == code ? 1 : 2;
546 atkbd->last = code;
553 if (value && test_bit(code, atkbd->force_release_mask)) {
554 input_event(dev, EV_MSC, MSC_SCAN, code);
679 unsigned int type, unsigned int code, int value)
1067 * they should be generating e4-e6 (0x80 | code).
1070 unsigned int code)
1073 (code == 0x64 || code == 0x65 || code == 0x66)) {
1075 code |= 0x80;
1078 return code;