Lines Matching refs:input

35 static void handle_buttons(struct input_dev *input)  in handle_buttons()  argument
37 struct buttons_dev *bdev = input_get_drvdata(input); in handle_buttons()
46 input_event(input, EV_MSC, MSC_SCAN, i); in handle_buttons()
47 input_report_key(input, bdev->keymap[i], 1); in handle_buttons()
48 input_sync(input); in handle_buttons()
52 input_event(input, EV_MSC, MSC_SCAN, i); in handle_buttons()
53 input_report_key(input, bdev->keymap[i], 0); in handle_buttons()
54 input_sync(input); in handle_buttons()
64 struct input_dev *input; in cobalt_buttons_probe() local
82 input = devm_input_allocate_device(&pdev->dev); in cobalt_buttons_probe()
83 if (!input) in cobalt_buttons_probe()
86 input_set_drvdata(input, bdev); in cobalt_buttons_probe()
88 input->name = "Cobalt buttons"; in cobalt_buttons_probe()
89 input->phys = "cobalt/input0"; in cobalt_buttons_probe()
90 input->id.bustype = BUS_HOST; in cobalt_buttons_probe()
92 input->keycode = bdev->keymap; in cobalt_buttons_probe()
93 input->keycodemax = ARRAY_SIZE(bdev->keymap); in cobalt_buttons_probe()
94 input->keycodesize = sizeof(unsigned short); in cobalt_buttons_probe()
96 input_set_capability(input, EV_MSC, MSC_SCAN); in cobalt_buttons_probe()
97 __set_bit(EV_KEY, input->evbit); in cobalt_buttons_probe()
99 __set_bit(bdev->keymap[i], input->keybit); in cobalt_buttons_probe()
100 __clear_bit(KEY_RESERVED, input->keybit); in cobalt_buttons_probe()
103 error = input_setup_polling(input, handle_buttons); in cobalt_buttons_probe()
107 input_set_poll_interval(input, BUTTONS_POLL_INTERVAL); in cobalt_buttons_probe()
109 error = input_register_device(input); in cobalt_buttons_probe()