Lines Matching full:keycode

230 	dev_dbg(&dev->dev, "Allocated space for %u keycode entries (%u bytes)\n",  in ir_create_table()
301 * ir_update_mapping() - set a keycode in the scancode->keycode table
305 * @new_keycode: the desired keycode
307 * This routine is used to update scancode->keycode mapping at given
310 * return: previous keycode assigned to the mapping
318 int old_keycode = rc_map->scan[index].keycode; in ir_update_mapping()
333 rc_map->scan[index].keycode = new_keycode; in ir_update_mapping()
340 /* ... but another scancode might use the same keycode */ in ir_update_mapping()
342 if (rc_map->scan[i].keycode == old_keycode) { in ir_update_mapping()
356 * ir_establish_scancode() - set a keycode in the scancode->keycode table
403 /* i is the proper index to insert our new keycode */ in ir_establish_scancode()
408 rc_map->scan[i].keycode = KEY_RESERVED; in ir_establish_scancode()
415 * ir_setkeycode() - set a keycode in the scancode->keycode table
422 * return: -EINVAL if the keycode could not be inserted, otherwise zero.
455 *old_keycode = ir_update_mapping(rdev, rc_map, index, ke->keycode); in ir_setkeycode()
463 * ir_setkeytable() - sets several entries in the scancode->keycode table
491 from->scan[i].keycode); in ir_setkeytable()
536 * ir_getkeycode() - get a keycode from the scancode->keycode table
571 ke->keycode = entry->keycode; in ir_getkeycode()
581 ke->keycode = KEY_RESERVED; in ir_getkeycode()
595 * rc_g_keycode_from_table() - gets the keycode that corresponds to a scancode
600 * keycode. Normally it should not be used since drivers should have no
603 * return: the corresponding keycode, or KEY_RESERVED
608 unsigned int keycode; in rc_g_keycode_from_table() local
615 keycode = index < rc_map->len ? in rc_g_keycode_from_table()
616 rc_map->scan[index].keycode : KEY_RESERVED; in rc_g_keycode_from_table()
620 if (keycode != KEY_RESERVED) in rc_g_keycode_from_table()
621 dev_dbg(&dev->dev, "%s: scancode 0x%04llx keycode 0x%02x\n", in rc_g_keycode_from_table()
622 dev->device_name, scancode, keycode); in rc_g_keycode_from_table()
624 return keycode; in rc_g_keycode_from_table()
744 .keycode = dev->keypressed ? dev->last_keycode : KEY_RESERVED, in rc_repeat()
774 * @keycode: the keycode of the keypress
781 u64 scancode, u32 keycode, u8 toggle) in ir_do_keydown() argument
791 .keycode = keycode in ir_do_keydown()
806 dev->last_keycode = keycode; in ir_do_keydown()
808 if (new_event && keycode != KEY_RESERVED) { in ir_do_keydown()
813 dev->device_name, keycode, protocol, scancode); in ir_do_keydown()
814 input_report_key(dev->input_dev, keycode, 1); in ir_do_keydown()
825 if (!new_event && keycode != KEY_RESERVED && in ir_do_keydown()
830 input_event(dev->input_dev, EV_KEY, keycode, 2); in ir_do_keydown()
853 u32 keycode = rc_g_keycode_from_table(dev, scancode); in rc_keydown() local
856 ir_do_keydown(dev, protocol, scancode, keycode, toggle); in rc_keydown()
883 u32 keycode = rc_g_keycode_from_table(dev, scancode); in rc_keydown_notimeout() local
886 ir_do_keydown(dev, protocol, scancode, keycode, toggle); in rc_keydown_notimeout()