Lines Matching refs:handle
107 static unsigned int input_to_handler(struct input_handle *handle, in input_to_handler() argument
110 struct input_handler *handler = handle->handler; in input_to_handler()
116 if (handler->filter(handle, v->type, v->code, v->value)) in input_to_handler()
129 handler->events(handle, vals, count); in input_to_handler()
132 handler->event(handle, v->type, v->code, v->value); in input_to_handler()
145 struct input_handle *handle; in input_pass_values() local
155 handle = rcu_dereference(dev->grab); in input_pass_values()
156 if (handle) { in input_pass_values()
157 count = input_to_handler(handle, vals, count); in input_pass_values()
159 list_for_each_entry_rcu(handle, &dev->h_list, d_node) in input_pass_values()
160 if (handle->open) { in input_pass_values()
161 count = input_to_handler(handle, vals, count); in input_pass_values()
452 void input_inject_event(struct input_handle *handle, in input_inject_event() argument
455 struct input_dev *dev = handle->dev; in input_inject_event()
464 if (!grab || grab == handle) in input_inject_event()
563 int input_grab_device(struct input_handle *handle) in input_grab_device() argument
565 struct input_dev *dev = handle->dev; in input_grab_device()
577 rcu_assign_pointer(dev->grab, handle); in input_grab_device()
585 static void __input_release_device(struct input_handle *handle) in __input_release_device() argument
587 struct input_dev *dev = handle->dev; in __input_release_device()
592 if (grabber == handle) { in __input_release_device()
597 list_for_each_entry(handle, &dev->h_list, d_node) in __input_release_device()
598 if (handle->open && handle->handler->start) in __input_release_device()
599 handle->handler->start(handle); in __input_release_device()
612 void input_release_device(struct input_handle *handle) in input_release_device() argument
614 struct input_dev *dev = handle->dev; in input_release_device()
617 __input_release_device(handle); in input_release_device()
629 int input_open_device(struct input_handle *handle) in input_open_device() argument
631 struct input_dev *dev = handle->dev; in input_open_device()
643 handle->open++; in input_open_device()
657 handle->open--; in input_open_device()
676 int input_flush_device(struct input_handle *handle, struct file *file) in input_flush_device() argument
678 struct input_dev *dev = handle->dev; in input_flush_device()
700 void input_close_device(struct input_handle *handle) in input_close_device() argument
702 struct input_dev *dev = handle->dev; in input_close_device()
706 __input_release_device(handle); in input_close_device()
715 if (!--handle->open) { in input_close_device()
754 struct input_handle *handle; in input_disconnect_device() local
776 list_for_each_entry(handle, &dev->h_list, d_node) in input_disconnect_device()
777 handle->open = 0; in input_disconnect_device()
1200 struct input_handle *handle; in input_devices_seq_show() local
1211 list_for_each_entry(handle, &dev->h_list, d_node) in input_devices_seq_show()
1212 seq_printf(seq, "%s ", handle->name); in input_devices_seq_show()
2289 struct input_handle *handle, *next; in __input_unregister_device() local
2295 list_for_each_entry_safe(handle, next, &dev->h_list, d_node) in __input_unregister_device()
2296 handle->handler->disconnect(handle); in __input_unregister_device()
2560 struct input_handle *handle, *next; in input_unregister_handler() local
2564 list_for_each_entry_safe(handle, next, &handler->h_list, h_node) in input_unregister_handler()
2565 handler->disconnect(handle); in input_unregister_handler()
2591 struct input_handle *handle; in input_handler_for_each_handle() local
2596 list_for_each_entry_rcu(handle, &handler->h_list, h_node) { in input_handler_for_each_handle()
2597 retval = fn(handle, data); in input_handler_for_each_handle()
2619 int input_register_handle(struct input_handle *handle) in input_register_handle() argument
2621 struct input_handler *handler = handle->handler; in input_register_handle()
2622 struct input_dev *dev = handle->dev; in input_register_handle()
2638 list_add_rcu(&handle->d_node, &dev->h_list); in input_register_handle()
2640 list_add_tail_rcu(&handle->d_node, &dev->h_list); in input_register_handle()
2650 list_add_tail_rcu(&handle->h_node, &handler->h_list); in input_register_handle()
2653 handler->start(handle); in input_register_handle()
2669 void input_unregister_handle(struct input_handle *handle) in input_unregister_handle() argument
2671 struct input_dev *dev = handle->dev; in input_unregister_handle()
2673 list_del_rcu(&handle->h_node); in input_unregister_handle()
2679 list_del_rcu(&handle->d_node); in input_unregister_handle()