Lines Matching defs:input

3  * Generic implementation of a polled input device
15 #include <linux/input-polldev.h>
18 MODULE_DESCRIPTION("Generic implementation of a polled input device");
41 static int input_open_polled_device(struct input_dev *input)
43 struct input_polled_dev *dev = input_get_drvdata(input);
57 static void input_close_polled_device(struct input_dev *input)
59 struct input_polled_dev *dev = input_get_drvdata(input);
82 struct input_dev *input = polldev->input;
96 mutex_lock(&input->mutex);
100 if (input->users) {
106 mutex_unlock(&input->mutex);
155 * for an input device associated with this polled device.
165 dev->input = input_allocate_device();
166 if (!dev->input) {
192 __func__, dev_name(&polldev->input->dev));
194 input_put_device(polldev->input);
204 __func__, dev_name(&polldev->input->dev));
205 input_unregister_device(polldev->input);
208 * Note that we are still holding extra reference to the input
220 * Managed polled input devices do not need to be explicitly unregistered
224 * fashion as regular polled input devices (using
231 * NOTE: the owner device is set up as parent of input device and users
250 polldev->input->dev.parent = dev;
265 * reference to the associated input device.
271 WARN_ON(devres_destroy(dev->input->dev.parent,
275 input_put_device(dev->input);
285 * The function registers previously initialized polled input device
286 * with input layer. The device should be allocated with call to
294 struct input_dev *input = dev->input;
306 input_set_drvdata(input, dev);
314 input->open = input_open_polled_device;
315 input->close = input_close_polled_device;
317 input->dev.groups = input_polldev_attribute_groups;
319 error = input_register_device(input);
326 * Take extra reference to the underlying input device so
332 input_get_device(input);
335 dev_dbg(input->dev.parent, "%s: registering %s with devres.\n",
336 __func__, dev_name(&input->dev));
337 devres_add(input->dev.parent, devres);
348 * The function unregisters previously registered polled input
349 * device from input layer. Polling is stopped and device is
355 WARN_ON(devres_destroy(dev->input->dev.parent,
360 input_unregister_device(dev->input);