Lines Matching full:scancode

167  * ir_create_table() - initializes a scancode table
201 * ir_free_table() - frees memory allocated by a scancode table
205 * scancode table.
217 * ir_resize_table() - resizes a scancode table if necessary
266 * ir_update_mapping() - set a keycode in the scancode->keycode table
268 * @rc_map: scancode table to be adjusted
272 * This routine is used to update scancode->keycode mapping at given
289 index, rc_map->scan[index].scancode); in ir_update_mapping()
297 rc_map->scan[index].scancode, new_keycode); in ir_update_mapping()
305 /* ... but another scancode might use the same keycode */ in ir_update_mapping()
321 * ir_establish_scancode() - set a keycode in the scancode->keycode table
323 * @rc_map: scancode table to be searched
324 * @scancode: the desired scancode
328 * This routine is used to locate given scancode in rc_map.
329 * If scancode is not yet present the routine will allocate a new slot
332 * return: index of the mapping containing scancode in question
337 unsigned int scancode, in ir_establish_scancode() argument
351 scancode &= dev->scancode_mask; in ir_establish_scancode()
355 if (rc_map->scan[i].scancode == scancode) in ir_establish_scancode()
358 /* Keytable is sorted from lowest to highest scancode */ in ir_establish_scancode()
359 if (rc_map->scan[i].scancode >= scancode) in ir_establish_scancode()
373 rc_map->scan[i].scancode = scancode; in ir_establish_scancode()
381 * ir_setkeycode() - set a keycode in the scancode->keycode table
397 unsigned int scancode; in ir_setkeycode() local
410 retval = input_scancode_to_scalar(ke, &scancode); in ir_setkeycode()
414 index = ir_establish_scancode(rdev, rc_map, scancode, true); in ir_setkeycode()
429 * ir_setkeytable() - sets several entries in the scancode->keycode table
451 from->scan[i].scancode, false); in ir_setkeytable()
469 const unsigned int *scancode = key; in rc_map_cmp() local
472 if (*scancode < e->scancode) in rc_map_cmp()
474 else if (*scancode > e->scancode) in rc_map_cmp()
480 * ir_lookup_by_scancode() - locate mapping by scancode
482 * @scancode: scancode to look for in the table
485 * given scancode.
490 unsigned int scancode) in ir_lookup_by_scancode() argument
494 res = bsearch(&scancode, rc_map->scan, rc_map->len, in ir_lookup_by_scancode()
503 * ir_getkeycode() - get a keycode from the scancode->keycode table
519 unsigned int scancode; in ir_getkeycode() local
527 retval = input_scancode_to_scalar(ke, &scancode); in ir_getkeycode()
531 index = ir_lookup_by_scancode(rc_map, scancode); in ir_getkeycode()
539 ke->len = sizeof(entry->scancode); in ir_getkeycode()
540 memcpy(ke->scancode, &entry->scancode, sizeof(entry->scancode)); in ir_getkeycode()
563 * rc_g_keycode_from_table() - gets the keycode that corresponds to a scancode
565 * @scancode: the scancode to look for
567 * This routine is used by drivers which need to convert a scancode to a
573 u32 rc_g_keycode_from_table(struct rc_dev *dev, u32 scancode) in rc_g_keycode_from_table() argument
582 index = ir_lookup_by_scancode(rc_map, scancode); in rc_g_keycode_from_table()
589 dev_dbg(&dev->dev, "%s: scancode 0x%04x keycode 0x%02x\n", in rc_g_keycode_from_table()
590 dev->device_name, scancode, keycode); in rc_g_keycode_from_table()
702 * not include the necessary bits to reproduce the scancode has been
711 .scancode = dev->last_scancode, .rc_proto = dev->last_protocol, in rc_repeat()
738 * @scancode: the scancode of the keypress
746 u32 scancode, u32 keycode, u8 toggle) in ir_do_keydown() argument
750 dev->last_scancode != scancode || in ir_do_keydown()
753 .scancode = scancode, .rc_proto = protocol, in ir_do_keydown()
764 input_event(dev->input_dev, EV_MSC, MSC_SCAN, scancode); in ir_do_keydown()
767 dev->last_scancode = scancode; in ir_do_keydown()
775 dev_dbg(&dev->dev, "%s: key down event, key 0x%04x, protocol 0x%04x, scancode 0x%08x\n", in ir_do_keydown()
776 dev->device_name, keycode, protocol, scancode); in ir_do_keydown()
805 * @scancode: the scancode for the keypress
812 void rc_keydown(struct rc_dev *dev, enum rc_proto protocol, u32 scancode, in rc_keydown() argument
816 u32 keycode = rc_g_keycode_from_table(dev, scancode); in rc_keydown()
819 ir_do_keydown(dev, protocol, scancode, keycode, toggle); in rc_keydown()
835 * @scancode: the scancode for the keypress
843 u32 scancode, u8 toggle) in rc_keydown_notimeout() argument
846 u32 keycode = rc_g_keycode_from_table(dev, scancode); in rc_keydown_notimeout()
849 ir_do_keydown(dev, protocol, scancode, keycode, toggle); in rc_keydown_notimeout()
855 * rc_validate_scancode() - checks that a scancode is valid for a protocol.
858 * @scancode: scancode
860 bool rc_validate_scancode(enum rc_proto proto, u32 scancode) in rc_validate_scancode() argument
868 if ((((scancode >> 16) ^ ~(scancode >> 8)) & 0xff) == 0) in rc_validate_scancode()
877 if ((((scancode >> 8) ^ ~scancode) & 0xff) == 0) in rc_validate_scancode()
885 if ((scancode & 0xffff0000) != 0x800f0000) in rc_validate_scancode()
889 if ((scancode & 0xffff0000) == 0x800f0000) in rc_validate_scancode()
900 * rc_validate_filter() - checks that the scancode and mask are valid and
903 * @filter: the scancode and mask
1310 * show_filter() - shows the current scancode filter value or mask
1315 * This routine is a callback routine to read a scancode filter value or mask.
1317 * It prints the current scancode filter value or mask of the appropriate filter
1352 * store_filter() - changes the scancode filter value
1358 * This routine is for changing a scancode filter value or mask.
1361 * specified or if scancode filtering is not supported by the driver, otherwise