Lines Matching refs:input

52 static void handle_buttons(struct input_dev *input)  in handle_buttons()  argument
54 struct buttons_dev *bdev = input_get_drvdata(input); in handle_buttons()
63 input_event(input, EV_MSC, MSC_SCAN, i); in handle_buttons()
64 input_report_key(input, bdev->keymap[i], 1); in handle_buttons()
65 input_sync(input); in handle_buttons()
69 input_event(input, EV_MSC, MSC_SCAN, i); in handle_buttons()
70 input_report_key(input, bdev->keymap[i], 0); in handle_buttons()
71 input_sync(input); in handle_buttons()
81 struct input_dev *input; in sgi_buttons_probe() local
88 input = devm_input_allocate_device(&pdev->dev); in sgi_buttons_probe()
89 if (!input) in sgi_buttons_probe()
94 input_set_drvdata(input, bdev); in sgi_buttons_probe()
96 input->name = "SGI buttons"; in sgi_buttons_probe()
97 input->phys = "sgi/input0"; in sgi_buttons_probe()
98 input->id.bustype = BUS_HOST; in sgi_buttons_probe()
100 input->keycode = bdev->keymap; in sgi_buttons_probe()
101 input->keycodemax = ARRAY_SIZE(bdev->keymap); in sgi_buttons_probe()
102 input->keycodesize = sizeof(unsigned short); in sgi_buttons_probe()
104 input_set_capability(input, EV_MSC, MSC_SCAN); in sgi_buttons_probe()
105 __set_bit(EV_KEY, input->evbit); in sgi_buttons_probe()
107 __set_bit(bdev->keymap[i], input->keybit); in sgi_buttons_probe()
108 __clear_bit(KEY_RESERVED, input->keybit); in sgi_buttons_probe()
110 error = input_setup_polling(input, handle_buttons); in sgi_buttons_probe()
114 input_set_poll_interval(input, BUTTONS_POLL_INTERVAL); in sgi_buttons_probe()
116 error = input_register_device(input); in sgi_buttons_probe()