Lines Matching refs:psmouse
35 int focaltech_detect(struct psmouse *psmouse, bool set_properties) in focaltech_detect() argument
37 if (!psmouse_matches_pnp_id(psmouse, focaltech_pnp_ids)) in focaltech_detect()
41 psmouse->vendor = "FocalTech"; in focaltech_detect()
42 psmouse->name = "Touchpad"; in focaltech_detect()
115 static void focaltech_report_state(struct psmouse *psmouse) in focaltech_report_state() argument
117 struct focaltech_data *priv = psmouse->private; in focaltech_report_state()
119 struct input_dev *dev = psmouse->dev; in focaltech_report_state()
149 static void focaltech_process_touch_packet(struct psmouse *psmouse, in focaltech_process_touch_packet() argument
152 struct focaltech_data *priv = psmouse->private; in focaltech_process_touch_packet()
173 static void focaltech_process_abs_packet(struct psmouse *psmouse, in focaltech_process_abs_packet() argument
176 struct focaltech_data *priv = psmouse->private; in focaltech_process_abs_packet()
182 psmouse_err(psmouse, "Invalid finger in abs packet: %d\n", in focaltech_process_abs_packet()
195 static void focaltech_process_rel_packet(struct psmouse *psmouse, in focaltech_process_rel_packet() argument
198 struct focaltech_data *priv = psmouse->private; in focaltech_process_rel_packet()
208 psmouse_err(psmouse, "First finger in rel packet invalid: %d\n", in focaltech_process_rel_packet()
226 static void focaltech_process_packet(struct psmouse *psmouse) in focaltech_process_packet() argument
228 unsigned char *packet = psmouse->packet; in focaltech_process_packet()
232 focaltech_process_touch_packet(psmouse, packet); in focaltech_process_packet()
236 focaltech_process_abs_packet(psmouse, packet); in focaltech_process_packet()
240 focaltech_process_rel_packet(psmouse, packet); in focaltech_process_packet()
244 psmouse_err(psmouse, "Unknown packet type: %02x\n", packet[0]); in focaltech_process_packet()
248 focaltech_report_state(psmouse); in focaltech_process_packet()
251 static psmouse_ret_t focaltech_process_byte(struct psmouse *psmouse) in focaltech_process_byte() argument
253 if (psmouse->pktcnt >= 6) { /* Full packet received */ in focaltech_process_byte()
254 focaltech_process_packet(psmouse); in focaltech_process_byte()
265 static int focaltech_switch_protocol(struct psmouse *psmouse) in focaltech_switch_protocol() argument
267 struct ps2dev *ps2dev = &psmouse->ps2dev; in focaltech_switch_protocol()
293 static void focaltech_reset(struct psmouse *psmouse) in focaltech_reset() argument
295 ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS); in focaltech_reset()
296 psmouse_reset(psmouse); in focaltech_reset()
299 static void focaltech_disconnect(struct psmouse *psmouse) in focaltech_disconnect() argument
301 focaltech_reset(psmouse); in focaltech_disconnect()
302 kfree(psmouse->private); in focaltech_disconnect()
303 psmouse->private = NULL; in focaltech_disconnect()
306 static int focaltech_reconnect(struct psmouse *psmouse) in focaltech_reconnect() argument
310 focaltech_reset(psmouse); in focaltech_reconnect()
312 error = focaltech_switch_protocol(psmouse); in focaltech_reconnect()
314 psmouse_err(psmouse, "Unable to initialize the device\n"); in focaltech_reconnect()
321 static void focaltech_set_input_params(struct psmouse *psmouse) in focaltech_set_input_params() argument
323 struct input_dev *dev = psmouse->dev; in focaltech_set_input_params()
324 struct focaltech_data *priv = psmouse->private; in focaltech_set_input_params()
373 static int focaltech_read_size(struct psmouse *psmouse) in focaltech_read_size() argument
375 struct ps2dev *ps2dev = &psmouse->ps2dev; in focaltech_read_size()
376 struct focaltech_data *priv = psmouse->private; in focaltech_read_size()
389 static void focaltech_set_resolution(struct psmouse *psmouse, in focaltech_set_resolution() argument
395 static void focaltech_set_rate(struct psmouse *psmouse, unsigned int rate) in focaltech_set_rate() argument
400 static void focaltech_set_scale(struct psmouse *psmouse, in focaltech_set_scale() argument
406 int focaltech_init(struct psmouse *psmouse) in focaltech_init() argument
411 psmouse->private = priv = kzalloc(sizeof(struct focaltech_data), in focaltech_init()
416 focaltech_reset(psmouse); in focaltech_init()
418 error = focaltech_read_size(psmouse); in focaltech_init()
420 psmouse_err(psmouse, in focaltech_init()
425 error = focaltech_switch_protocol(psmouse); in focaltech_init()
427 psmouse_err(psmouse, "Unable to initialize the device\n"); in focaltech_init()
431 focaltech_set_input_params(psmouse); in focaltech_init()
433 psmouse->protocol_handler = focaltech_process_byte; in focaltech_init()
434 psmouse->pktsize = 6; in focaltech_init()
435 psmouse->disconnect = focaltech_disconnect; in focaltech_init()
436 psmouse->reconnect = focaltech_reconnect; in focaltech_init()
437 psmouse->cleanup = focaltech_reset; in focaltech_init()
439 psmouse->resync_time = 0; in focaltech_init()
445 psmouse->set_resolution = focaltech_set_resolution; in focaltech_init()
446 psmouse->set_rate = focaltech_set_rate; in focaltech_init()
447 psmouse->set_scale = focaltech_set_scale; in focaltech_init()
452 focaltech_reset(psmouse); in focaltech_init()