Lines Matching refs:code

38 MODULE_PARM_DESC(set, "Select keyboard code set (2 = default, 3 = PS/2 native)");
349 static bool atkbd_need_xlate(unsigned long xl_bit, unsigned char code)
353 if (code == ATKBD_RET_EMUL0 || code == ATKBD_RET_EMUL1)
357 if (code == xl_table[i])
368 static void atkbd_calculate_xl_bit(struct atkbd *atkbd, unsigned char code)
373 if (!((code ^ xl_table[i]) & 0x7f)) {
374 if (code & 0x80)
387 static unsigned int atkbd_compat_scancode(struct atkbd *atkbd, unsigned int code)
391 code |= 0x100;
393 code = (code & 0x7f) | ((code & 0x80) << 1);
395 code |= 0x80;
398 return code;
447 unsigned int code = data;
457 input_event(dev, EV_MSC, MSC_RAW, code);
460 code = atkbd_platform_scancode_fixup(atkbd, code);
464 if (atkbd->emul || atkbd_need_xlate(atkbd->xl_bit, code)) {
465 atkbd->release = code >> 7;
466 code &= 0x7f;
473 switch (code) {
502 code = atkbd_compat_scancode(atkbd, code);
507 keycode = atkbd->keycode[code];
509 if (!(atkbd->release && test_bit(code, atkbd->force_release_mask)))
511 input_event(dev, EV_MSC, MSC_SCAN, code);
518 "Unknown key %s (%s set %d, code %#x on %s).\n",
521 atkbd->set, code, serio->phys);
524 code & 0x80 ? "e0" : "", code & 0x7f);
554 value = time_before(jiffies, atkbd->time) && atkbd->last == code ? 1 : 2;
557 atkbd->last = code;
564 if (value && test_bit(code, atkbd->force_release_mask)) {
565 input_event(dev, EV_MSC, MSC_SCAN, code);
688 unsigned int type, unsigned int code, int value)
1075 * they should be generating e4-e6 (0x80 | code).
1078 unsigned int code)
1081 (code == 0x64 || code == 0x65 || code == 0x66)) {
1083 code |= 0x80;
1086 return code;