Lines Matching refs:psmouse
115 static void vmmouse_report_button(struct psmouse *psmouse, in vmmouse_report_button() argument
141 static psmouse_ret_t vmmouse_report_events(struct psmouse *psmouse) in vmmouse_report_events() argument
143 struct input_dev *rel_dev = psmouse->dev; in vmmouse_report_events()
144 struct vmmouse_data *priv = psmouse->private; in vmmouse_report_events()
157 psmouse_err(psmouse, "failed to fetch status data\n"); in vmmouse_report_events()
170 psmouse_err(psmouse, "invalid queue length\n"); in vmmouse_report_events()
197 vmmouse_report_button(psmouse, abs_dev, rel_dev, in vmmouse_report_events()
200 vmmouse_report_button(psmouse, abs_dev, rel_dev, in vmmouse_report_events()
203 vmmouse_report_button(psmouse, abs_dev, rel_dev, in vmmouse_report_events()
223 static psmouse_ret_t vmmouse_process_byte(struct psmouse *psmouse) in vmmouse_process_byte() argument
225 unsigned char *packet = psmouse->packet; in vmmouse_process_byte()
227 switch (psmouse->pktcnt) { in vmmouse_process_byte()
236 return vmmouse_report_events(psmouse); in vmmouse_process_byte()
247 static void vmmouse_disable(struct psmouse *psmouse) in vmmouse_disable() argument
259 psmouse_warn(psmouse, "failed to disable vmmouse device\n"); in vmmouse_disable()
271 static int vmmouse_enable(struct psmouse *psmouse) in vmmouse_enable() argument
288 psmouse_dbg(psmouse, "empty flags - assuming no device\n"); in vmmouse_enable()
295 psmouse_dbg(psmouse, "Unexpected version value: %u vs %u\n", in vmmouse_enable()
297 vmmouse_disable(psmouse); in vmmouse_enable()
343 int vmmouse_detect(struct psmouse *psmouse, bool set_properties) in vmmouse_detect() argument
348 psmouse_dbg(psmouse, in vmmouse_detect()
360 psmouse->vendor = VMMOUSE_VENDOR; in vmmouse_detect()
361 psmouse->name = VMMOUSE_NAME; in vmmouse_detect()
362 psmouse->model = version; in vmmouse_detect()
375 static void vmmouse_disconnect(struct psmouse *psmouse) in vmmouse_disconnect() argument
377 struct vmmouse_data *priv = psmouse->private; in vmmouse_disconnect()
379 vmmouse_disable(psmouse); in vmmouse_disconnect()
380 psmouse_reset(psmouse); in vmmouse_disconnect()
393 static int vmmouse_reconnect(struct psmouse *psmouse) in vmmouse_reconnect() argument
397 psmouse_reset(psmouse); in vmmouse_reconnect()
398 vmmouse_disable(psmouse); in vmmouse_reconnect()
399 error = vmmouse_enable(psmouse); in vmmouse_reconnect()
401 psmouse_err(psmouse, in vmmouse_reconnect()
420 int vmmouse_init(struct psmouse *psmouse) in vmmouse_init() argument
423 struct input_dev *rel_dev = psmouse->dev, *abs_dev; in vmmouse_init()
426 psmouse_reset(psmouse); in vmmouse_init()
427 error = vmmouse_enable(psmouse); in vmmouse_init()
439 psmouse->private = priv; in vmmouse_init()
443 psmouse->ps2dev.serio->phys); in vmmouse_init()
453 abs_dev->id.version = psmouse->model; in vmmouse_init()
454 abs_dev->dev.parent = &psmouse->ps2dev.serio->dev; in vmmouse_init()
472 psmouse->protocol_handler = vmmouse_process_byte; in vmmouse_init()
473 psmouse->disconnect = vmmouse_disconnect; in vmmouse_init()
474 psmouse->reconnect = vmmouse_reconnect; in vmmouse_init()
479 vmmouse_disable(psmouse); in vmmouse_init()
480 psmouse_reset(psmouse); in vmmouse_init()
483 psmouse->private = NULL; in vmmouse_init()