Lines Matching refs:psmouse
227 struct psmouse *psmouse; member
236 static void byd_report_input(struct psmouse *psmouse) in byd_report_input() argument
238 struct byd_data *priv = psmouse->private; in byd_report_input()
239 struct input_dev *dev = psmouse->dev; in byd_report_input()
255 struct psmouse *psmouse = priv->psmouse; in byd_clear_touch() local
257 serio_pause_rx(psmouse->ps2dev.serio); in byd_clear_touch()
260 byd_report_input(psmouse); in byd_clear_touch()
262 serio_continue_rx(psmouse->ps2dev.serio); in byd_clear_touch()
273 static psmouse_ret_t byd_process_byte(struct psmouse *psmouse) in byd_process_byte() argument
275 struct byd_data *priv = psmouse->private; in byd_process_byte()
276 u8 *pkt = psmouse->packet; in byd_process_byte()
278 if (psmouse->pktcnt > 0 && !(pkt[0] & PS2_ALWAYS_1)) { in byd_process_byte()
279 psmouse_warn(psmouse, "Always_1 bit not 1. pkt[0] = %02x\n", in byd_process_byte()
284 if (psmouse->pktcnt < psmouse->pktsize) in byd_process_byte()
318 psmouse_warn(psmouse, in byd_process_byte()
320 psmouse->packet[0], psmouse->packet[1], in byd_process_byte()
321 psmouse->packet[2], psmouse->packet[3]); in byd_process_byte()
328 byd_report_input(psmouse); in byd_process_byte()
339 static int byd_reset_touchpad(struct psmouse *psmouse) in byd_reset_touchpad() argument
341 struct ps2dev *ps2dev = &psmouse->ps2dev; in byd_reset_touchpad()
394 psmouse_set_state(psmouse, PSMOUSE_ACTIVATED); in byd_reset_touchpad()
398 static int byd_reconnect(struct psmouse *psmouse) in byd_reconnect() argument
402 psmouse_dbg(psmouse, "Reconnect\n"); in byd_reconnect()
404 psmouse_reset(psmouse); in byd_reconnect()
407 error = byd_detect(psmouse, 0); in byd_reconnect()
413 psmouse_dbg(psmouse, "Reconnected after %d attempts\n", retry); in byd_reconnect()
415 error = byd_reset_touchpad(psmouse); in byd_reconnect()
417 psmouse_err(psmouse, "Unable to initialize device\n"); in byd_reconnect()
424 static void byd_disconnect(struct psmouse *psmouse) in byd_disconnect() argument
426 struct byd_data *priv = psmouse->private; in byd_disconnect()
430 kfree(psmouse->private); in byd_disconnect()
431 psmouse->private = NULL; in byd_disconnect()
435 int byd_detect(struct psmouse *psmouse, bool set_properties) in byd_detect() argument
437 struct ps2dev *ps2dev = &psmouse->ps2dev; in byd_detect()
454 psmouse_dbg(psmouse, "BYD touchpad detected\n"); in byd_detect()
457 psmouse->vendor = "BYD"; in byd_detect()
458 psmouse->name = "TouchPad"; in byd_detect()
464 int byd_init(struct psmouse *psmouse) in byd_init() argument
466 struct input_dev *dev = psmouse->dev; in byd_init()
469 if (psmouse_reset(psmouse)) in byd_init()
472 if (byd_reset_touchpad(psmouse)) in byd_init()
479 priv->psmouse = psmouse; in byd_init()
482 psmouse->private = priv; in byd_init()
483 psmouse->disconnect = byd_disconnect; in byd_init()
484 psmouse->reconnect = byd_reconnect; in byd_init()
485 psmouse->protocol_handler = byd_process_byte; in byd_init()
486 psmouse->pktsize = 4; in byd_init()
487 psmouse->resync_time = 0; in byd_init()