Lines Matching defs:input
3 * vboxguest linux pci driver, char-dev and input-device code,
9 #include <linux/input.h>
197 * Called when the input device is first opened.
201 static int vbg_input_open(struct input_dev *input)
203 struct vbg_dev *gdev = input_get_drvdata(input);
210 * Called if all open handles to the input device are closed.
214 static void vbg_input_close(struct input_dev *input)
216 struct vbg_dev *gdev = input_get_drvdata(input);
222 * Creates the kernel input device.
228 struct input_dev *input;
230 input = devm_input_allocate_device(gdev->dev);
231 if (!input)
234 input->id.bustype = BUS_PCI;
235 input->id.vendor = VBOX_VENDORID;
236 input->id.product = VMMDEV_DEVICEID;
237 input->open = vbg_input_open;
238 input->close = vbg_input_close;
239 input->dev.parent = gdev->dev;
240 input->name = "VirtualBox mouse integration";
242 input_set_abs_params(input, ABS_X, VMMDEV_MOUSE_RANGE_MIN,
244 input_set_abs_params(input, ABS_Y, VMMDEV_MOUSE_RANGE_MIN,
246 input_set_capability(input, EV_KEY, BTN_MOUSE);
247 input_set_drvdata(input, gdev);
249 gdev->input = input;
251 return input_register_device(gdev->input);
355 vbg_err("vboxguest: Error creating input device: %d\n", ret);
469 /* Report events to the kernel input device */
475 input_report_abs(gdev->input, ABS_X,
477 input_report_abs(gdev->input, ABS_Y,
479 input_sync(gdev->input);