Lines Matching refs:input

36 	struct input_dev *input;  member
44 static void gpio_keys_button_event(struct input_dev *input, in gpio_keys_button_event() argument
48 struct gpio_keys_polled_dev *bdev = input_get_drvdata(input); in gpio_keys_button_event()
53 input_event(input, type, button->code, button->value); in gpio_keys_button_event()
58 input_event(input, type, button->code, button->value); in gpio_keys_button_event()
62 input_event(input, type, button->code, state); in gpio_keys_button_event()
63 input_sync(input); in gpio_keys_button_event()
67 static void gpio_keys_polled_check_state(struct input_dev *input, in gpio_keys_polled_check_state() argument
75 dev_err(input->dev.parent, in gpio_keys_polled_check_state()
78 gpio_keys_button_event(input, button, state); in gpio_keys_polled_check_state()
87 static void gpio_keys_polled_poll(struct input_dev *input) in gpio_keys_polled_poll() argument
89 struct gpio_keys_polled_dev *bdev = input_get_drvdata(input); in gpio_keys_polled_poll()
101 gpio_keys_button_event(input, &pdata->buttons[i], in gpio_keys_polled_poll()
104 gpio_keys_polled_check_state(input, &pdata->buttons[i], in gpio_keys_polled_poll()
109 for_each_set_bit(i, input->relbit, REL_CNT) { in gpio_keys_polled_poll()
111 input_event(input, EV_REL, i, 0); in gpio_keys_polled_poll()
114 for_each_set_bit(i, input->absbit, ABS_CNT) { in gpio_keys_polled_poll()
116 input_event(input, EV_ABS, i, 0); in gpio_keys_polled_poll()
119 input_sync(input); in gpio_keys_polled_poll()
122 static int gpio_keys_polled_open(struct input_dev *input) in gpio_keys_polled_open() argument
124 struct gpio_keys_polled_dev *bdev = input_get_drvdata(input); in gpio_keys_polled_open()
133 static void gpio_keys_polled_close(struct input_dev *input) in gpio_keys_polled_close() argument
135 struct gpio_keys_polled_dev *bdev = input_get_drvdata(input); in gpio_keys_polled_close()
202 static void gpio_keys_polled_set_abs_params(struct input_dev *input, in gpio_keys_polled_set_abs_params() argument
219 input_set_abs_params(input, code, min, max, 0, 0); in gpio_keys_polled_set_abs_params()
234 struct input_dev *input; in gpio_keys_polled_probe() local
256 input = devm_input_allocate_device(dev); in gpio_keys_polled_probe()
257 if (!input) { in gpio_keys_polled_probe()
262 input_set_drvdata(input, bdev); in gpio_keys_polled_probe()
264 input->name = pdata->name ?: pdev->name; in gpio_keys_polled_probe()
265 input->phys = DRV_NAME"/input0"; in gpio_keys_polled_probe()
267 input->id.bustype = BUS_HOST; in gpio_keys_polled_probe()
268 input->id.vendor = 0x0001; in gpio_keys_polled_probe()
269 input->id.product = 0x0001; in gpio_keys_polled_probe()
270 input->id.version = 0x0100; in gpio_keys_polled_probe()
272 input->open = gpio_keys_polled_open; in gpio_keys_polled_probe()
273 input->close = gpio_keys_polled_close; in gpio_keys_polled_probe()
275 __set_bit(EV_KEY, input->evbit); in gpio_keys_polled_probe()
277 __set_bit(EV_REP, input->evbit); in gpio_keys_polled_probe()
342 input_set_capability(input, type, button->code); in gpio_keys_polled_probe()
344 gpio_keys_polled_set_abs_params(input, pdata, in gpio_keys_polled_probe()
350 bdev->input = input; in gpio_keys_polled_probe()
354 error = input_setup_polling(input, gpio_keys_polled_poll); in gpio_keys_polled_probe()
360 input_set_poll_interval(input, pdata->poll_interval); in gpio_keys_polled_probe()
362 error = input_register_device(input); in gpio_keys_polled_probe()
371 gpio_keys_polled_check_state(input, &pdata->buttons[i], in gpio_keys_polled_probe()
374 input_sync(input); in gpio_keys_polled_probe()