Lines Matching defs:handler
79 struct input_handler *handler;
86 handle->handler->event(handle, type, code, value);
94 handler = handle->handler;
95 if (!handler->filter) {
99 handler->event(handle, type, code, value);
101 } else if (handler->filter(handle, type, code, value))
362 * input_inject_event() - send input event from input handler
471 if (handle->open && handle->handler->start)
472 handle->handler->start(handle);
799 static const struct input_device_id *input_match_device(struct input_handler *handler,
805 for (id = handler->id_table; id->flags || id->driver_info; id++) {
833 if (!handler->match || handler->match(handler, dev))
840 static int input_attach_handler(struct input_dev *dev, struct input_handler *handler)
845 id = input_match_device(handler, dev);
849 error = handler->connect(handler, dev, id);
852 "input: failed to attach handler %s to device %s, "
854 handler->name, kobject_name(&dev->dev.kobj), error);
1077 struct input_handler *handler = container_of(v, struct input_handler, node);
1080 seq_printf(seq, "N: Number=%u Name=%s", state->pos, handler->name);
1081 if (handler->filter)
1083 if (handler->fops)
1084 seq_printf(seq, " Minor=%d", handler->minor);
1737 struct input_handler *handler;
1788 list_for_each_entry(handler, &input_handler_list, node)
1789 input_attach_handler(dev, handler);
1815 handle->handler->disconnect(handle);
1830 * input_register_handler - register a new input handler
1831 * @handler: handler to be registered
1833 * This function registers a new input handler (interface) for input
1835 * are compatible with the handler.
1837 int input_register_handler(struct input_handler *handler)
1846 INIT_LIST_HEAD(&handler->h_list);
1848 if (handler->fops != NULL) {
1849 if (input_table[handler->minor >> 5]) {
1853 input_table[handler->minor >> 5] = handler;
1856 list_add_tail(&handler->node, &input_handler_list);
1859 input_attach_handler(dev, handler);
1870 * input_unregister_handler - unregisters an input handler
1871 * @handler: handler to be unregistered
1873 * This function disconnects a handler from its input devices and
1876 void input_unregister_handler(struct input_handler *handler)
1882 list_for_each_entry_safe(handle, next, &handler->h_list, h_node)
1883 handler->disconnect(handle);
1884 WARN_ON(!list_empty(&handler->h_list));
1886 list_del_init(&handler->node);
1888 if (handler->fops != NULL)
1889 input_table[handler->minor >> 5] = NULL;
1899 * @handler: input handler to iterate
1909 int input_handler_for_each_handle(struct input_handler *handler, void *data,
1917 list_for_each_entry_rcu(handle, &handler->h_list, h_node) {
1934 * and handler's lists so that events can flow through
1937 * This function is supposed to be called from handler's
1942 struct input_handler *handler = handle->handler;
1958 if (handler->filter)
1971 list_add_tail_rcu(&handle->h_node, &handler->h_list);
1973 if (handler->start)
1974 handler->start(handle);
1985 * and handler's lists.
1987 * This function is supposed to be called from handler's
2009 struct input_handler *handler;
2018 handler = input_table[iminor(inode) >> 5];
2019 if (handler)
2020 new_fops = fops_get(handler->fops);