Lines Matching refs:handle
190 static int getkeycode_helper(struct input_handle *handle, void *data) in getkeycode_helper() argument
194 d->error = input_get_keycode(handle->dev, &d->ke); in getkeycode_helper()
217 static int setkeycode_helper(struct input_handle *handle, void *data) in setkeycode_helper() argument
221 d->error = input_set_keycode(handle->dev, &d->ke); in setkeycode_helper()
249 static int kd_sound_helper(struct input_handle *handle, void *data) in kd_sound_helper() argument
252 struct input_dev *dev = handle->dev; in kd_sound_helper()
256 input_inject_event(handle, EV_SND, SND_TONE, *hz); in kd_sound_helper()
261 input_inject_event(handle, EV_SND, SND_BELL, *hz ? 1 : 0); in kd_sound_helper()
291 static int kbd_rate_helper(struct input_handle *handle, void *data) in kbd_rate_helper() argument
293 struct input_dev *dev = handle->dev; in kbd_rate_helper()
299 input_inject_event(handle, in kbd_rate_helper()
302 input_inject_event(handle, in kbd_rate_helper()
1088 static int kbd_update_leds_helper(struct input_handle *handle, void *data) in kbd_update_leds_helper() argument
1092 if (test_bit(EV_LED, handle->dev->evbit)) in kbd_update_leds_helper()
1113 static int kbd_update_leds_helper(struct input_handle *handle, void *data) in kbd_update_leds_helper() argument
1117 if (test_bit(EV_LED, handle->dev->evbit)) { in kbd_update_leds_helper()
1118 input_inject_event(handle, EV_LED, LED_SCROLLL, !!(leds & BIT(0))); in kbd_update_leds_helper()
1119 input_inject_event(handle, EV_LED, LED_NUML, !!(leds & BIT(1))); in kbd_update_leds_helper()
1120 input_inject_event(handle, EV_LED, LED_CAPSL, !!(leds & BIT(2))); in kbd_update_leds_helper()
1121 input_inject_event(handle, EV_SYN, SYN_REPORT, 0); in kbd_update_leds_helper()
1533 static void kbd_event(struct input_handle *handle, unsigned int event_type, in kbd_event() argument
1540 kbd_is_hw_raw(handle->dev)) in kbd_event()
1543 kbd_keycode(event_code, value, kbd_is_hw_raw(handle->dev)); in kbd_event()
1578 struct input_handle *handle; in kbd_connect() local
1581 handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL); in kbd_connect()
1582 if (!handle) in kbd_connect()
1585 handle->dev = dev; in kbd_connect()
1586 handle->handler = handler; in kbd_connect()
1587 handle->name = "kbd"; in kbd_connect()
1589 error = input_register_handle(handle); in kbd_connect()
1593 error = input_open_device(handle); in kbd_connect()
1600 input_unregister_handle(handle); in kbd_connect()
1602 kfree(handle); in kbd_connect()
1606 static void kbd_disconnect(struct input_handle *handle) in kbd_disconnect() argument
1608 input_close_device(handle); in kbd_disconnect()
1609 input_unregister_handle(handle); in kbd_disconnect()
1610 kfree(handle); in kbd_disconnect()
1617 static void kbd_start(struct input_handle *handle) in kbd_start() argument
1622 kbd_update_leds_helper(handle, &ledstate); in kbd_start()