• Home
  • Raw
  • Download

Lines Matching full:scancode

160  * ir_create_table() - initializes a scancode table
194 * ir_free_table() - frees memory allocated by a scancode table
198 * scancode table.
210 * ir_resize_table() - resizes a scancode table if necessary
259 * ir_update_mapping() - set a keycode in the scancode->keycode table
261 * @rc_map: scancode table to be adjusted
265 * This routine is used to update scancode->keycode mapping at given
282 index, rc_map->scan[index].scancode); in ir_update_mapping()
290 rc_map->scan[index].scancode, new_keycode); in ir_update_mapping()
298 /* ... but another scancode might use the same keycode */ in ir_update_mapping()
314 * ir_establish_scancode() - set a keycode in the scancode->keycode table
316 * @rc_map: scancode table to be searched
317 * @scancode: the desired scancode
321 * This routine is used to locate given scancode in rc_map.
322 * If scancode is not yet present the routine will allocate a new slot
325 * return: index of the mapping containing scancode in question
330 unsigned int scancode, in ir_establish_scancode() argument
344 scancode &= dev->scancode_mask; in ir_establish_scancode()
348 if (rc_map->scan[i].scancode == scancode) in ir_establish_scancode()
351 /* Keytable is sorted from lowest to highest scancode */ in ir_establish_scancode()
352 if (rc_map->scan[i].scancode >= scancode) in ir_establish_scancode()
366 rc_map->scan[i].scancode = scancode; in ir_establish_scancode()
374 * ir_setkeycode() - set a keycode in the scancode->keycode table
390 unsigned int scancode; in ir_setkeycode() local
403 retval = input_scancode_to_scalar(ke, &scancode); in ir_setkeycode()
407 index = ir_establish_scancode(rdev, rc_map, scancode, true); in ir_setkeycode()
422 * ir_setkeytable() - sets several entries in the scancode->keycode table
444 from->scan[i].scancode, false); in ir_setkeytable()
462 const unsigned int *scancode = key; in rc_map_cmp() local
465 if (*scancode < e->scancode) in rc_map_cmp()
467 else if (*scancode > e->scancode) in rc_map_cmp()
473 * ir_lookup_by_scancode() - locate mapping by scancode
475 * @scancode: scancode to look for in the table
478 * given scancode.
483 unsigned int scancode) in ir_lookup_by_scancode() argument
487 res = bsearch(&scancode, rc_map->scan, rc_map->len, in ir_lookup_by_scancode()
496 * ir_getkeycode() - get a keycode from the scancode->keycode table
512 unsigned int scancode; in ir_getkeycode() local
520 retval = input_scancode_to_scalar(ke, &scancode); in ir_getkeycode()
524 index = ir_lookup_by_scancode(rc_map, scancode); in ir_getkeycode()
532 ke->len = sizeof(entry->scancode); in ir_getkeycode()
533 memcpy(ke->scancode, &entry->scancode, sizeof(entry->scancode)); in ir_getkeycode()
556 * rc_g_keycode_from_table() - gets the keycode that corresponds to a scancode
558 * @scancode: the scancode to look for
560 * This routine is used by drivers which need to convert a scancode to a
566 u32 rc_g_keycode_from_table(struct rc_dev *dev, u32 scancode) in rc_g_keycode_from_table() argument
575 index = ir_lookup_by_scancode(rc_map, scancode); in rc_g_keycode_from_table()
582 dev_dbg(&dev->dev, "%s: scancode 0x%04x keycode 0x%02x\n", in rc_g_keycode_from_table()
583 dev->device_name, scancode, keycode); in rc_g_keycode_from_table()
695 * not include the necessary bits to reproduce the scancode has been
704 .scancode = dev->last_scancode, .rc_proto = dev->last_protocol, in rc_repeat()
731 * @scancode: the scancode of the keypress
739 u32 scancode, u32 keycode, u8 toggle) in ir_do_keydown() argument
743 dev->last_scancode != scancode || in ir_do_keydown()
746 .scancode = scancode, .rc_proto = protocol, in ir_do_keydown()
757 input_event(dev->input_dev, EV_MSC, MSC_SCAN, scancode); in ir_do_keydown()
760 dev->last_scancode = scancode; in ir_do_keydown()
768 dev_dbg(&dev->dev, "%s: key down event, key 0x%04x, protocol 0x%04x, scancode 0x%08x\n", in ir_do_keydown()
769 dev->device_name, keycode, protocol, scancode); in ir_do_keydown()
798 * @scancode: the scancode for the keypress
805 void rc_keydown(struct rc_dev *dev, enum rc_proto protocol, u32 scancode, in rc_keydown() argument
809 u32 keycode = rc_g_keycode_from_table(dev, scancode); in rc_keydown()
812 ir_do_keydown(dev, protocol, scancode, keycode, toggle); in rc_keydown()
828 * @scancode: the scancode for the keypress
836 u32 scancode, u8 toggle) in rc_keydown_notimeout() argument
839 u32 keycode = rc_g_keycode_from_table(dev, scancode); in rc_keydown_notimeout()
842 ir_do_keydown(dev, protocol, scancode, keycode, toggle); in rc_keydown_notimeout()
848 * rc_validate_scancode() - checks that a scancode is valid for a protocol.
851 * @scancode: scancode
853 bool rc_validate_scancode(enum rc_proto proto, u32 scancode) in rc_validate_scancode() argument
861 if ((((scancode >> 16) ^ ~(scancode >> 8)) & 0xff) == 0) in rc_validate_scancode()
870 if ((((scancode >> 8) ^ ~scancode) & 0xff) == 0) in rc_validate_scancode()
878 if ((scancode & 0xffff0000) != 0x800f0000) in rc_validate_scancode()
882 if ((scancode & 0xffff0000) == 0x800f0000) in rc_validate_scancode()
893 * rc_validate_filter() - checks that the scancode and mask are valid and
896 * @filter: the scancode and mask
1303 * show_filter() - shows the current scancode filter value or mask
1308 * This routine is a callback routine to read a scancode filter value or mask.
1310 * It prints the current scancode filter value or mask of the appropriate filter
1345 * store_filter() - changes the scancode filter value
1351 * This routine is for changing a scancode filter value or mask.
1354 * specified or if scancode filtering is not supported by the driver, otherwise