Lines Matching refs:code
53 static inline int is_event_supported(unsigned int code, in is_event_supported() argument
56 return code <= max && test_bit(code, bm); in is_event_supported()
75 static void input_start_autorepeat(struct input_dev *dev, int code) in input_start_autorepeat() argument
80 dev->repeat_key = code; in input_start_autorepeat()
105 handler->filter(handle, v->type, v->code, v->value)) in input_to_handler()
120 handler->event(handle, v->type, v->code, v->value); in input_to_handler()
152 add_input_randomness(vals->type, vals->code, vals->value); in input_pass_values()
158 input_start_autorepeat(dev, v->code); in input_pass_values()
166 unsigned int type, unsigned int code, int value) in input_pass_event() argument
168 struct input_value vals[] = { { type, code, value } }; in input_pass_event()
210 unsigned int code, int *pval) in input_handle_abs_event() argument
216 if (code == ABS_MT_SLOT) { in input_handle_abs_event()
227 is_mt_event = input_is_mt_value(code); in input_handle_abs_event()
230 pold = &dev->absinfo[code].value; in input_handle_abs_event()
232 pold = &mt->slots[mt->slot].abs[code - ABS_MT_FIRST]; in input_handle_abs_event()
243 dev->absinfo[code].fuzz); in input_handle_abs_event()
260 unsigned int type, unsigned int code, int *pval) in input_get_disposition() argument
268 switch (code) { in input_get_disposition()
283 if (is_event_supported(code, dev->keybit, KEY_MAX)) { in input_get_disposition()
291 if (!!test_bit(code, dev->key) != !!value) { in input_get_disposition()
293 __change_bit(code, dev->key); in input_get_disposition()
300 if (is_event_supported(code, dev->swbit, SW_MAX) && in input_get_disposition()
301 !!test_bit(code, dev->sw) != !!value) { in input_get_disposition()
303 __change_bit(code, dev->sw); in input_get_disposition()
309 if (is_event_supported(code, dev->absbit, ABS_MAX)) in input_get_disposition()
310 disposition = input_handle_abs_event(dev, code, &value); in input_get_disposition()
315 if (is_event_supported(code, dev->relbit, REL_MAX) && value) in input_get_disposition()
321 if (is_event_supported(code, dev->mscbit, MSC_MAX)) in input_get_disposition()
327 if (is_event_supported(code, dev->ledbit, LED_MAX) && in input_get_disposition()
328 !!test_bit(code, dev->led) != !!value) { in input_get_disposition()
330 __change_bit(code, dev->led); in input_get_disposition()
336 if (is_event_supported(code, dev->sndbit, SND_MAX)) { in input_get_disposition()
338 if (!!test_bit(code, dev->snd) != !!value) in input_get_disposition()
339 __change_bit(code, dev->snd); in input_get_disposition()
345 if (code <= REP_MAX && value >= 0 && dev->rep[code] != value) { in input_get_disposition()
346 dev->rep[code] = value; in input_get_disposition()
366 unsigned int type, unsigned int code, int value) in input_handle_event() argument
370 disposition = input_get_disposition(dev, type, code, &value); in input_handle_event()
373 dev->event(dev, type, code, value); in input_handle_event()
384 v->code = ABS_MT_SLOT; in input_handle_event()
390 v->code = code; in input_handle_event()
424 unsigned int type, unsigned int code, int value) in input_event() argument
431 input_handle_event(dev, type, code, value); in input_event()
449 unsigned int type, unsigned int code, int value) in input_inject_event() argument
461 input_handle_event(dev, type, code, value); in input_inject_event()
672 int code; in input_dev_release_keys() local
675 for (code = 0; code <= KEY_MAX; code++) { in input_dev_release_keys()
676 if (is_event_supported(code, dev->keybit, KEY_MAX) && in input_dev_release_keys()
677 __test_and_clear_bit(code, dev->key)) { in input_dev_release_keys()
678 input_pass_event(dev, EV_KEY, code, 0); in input_dev_release_keys()
1906 void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code) in input_set_capability() argument
1910 __set_bit(code, dev->keybit); in input_set_capability()
1914 __set_bit(code, dev->relbit); in input_set_capability()
1922 __set_bit(code, dev->absbit); in input_set_capability()
1926 __set_bit(code, dev->mscbit); in input_set_capability()
1930 __set_bit(code, dev->swbit); in input_set_capability()
1934 __set_bit(code, dev->ledbit); in input_set_capability()
1938 __set_bit(code, dev->sndbit); in input_set_capability()
1942 __set_bit(code, dev->ffbit); in input_set_capability()
1951 type, code); in input_set_capability()