Lines Matching refs:psmouse

102 static ssize_t trackpoint_show_int_attr(struct psmouse *psmouse,  in trackpoint_show_int_attr()  argument
105 struct trackpoint_data *tp = psmouse->private; in trackpoint_show_int_attr()
115 static ssize_t trackpoint_set_int_attr(struct psmouse *psmouse, void *data, in trackpoint_set_int_attr() argument
118 struct trackpoint_data *tp = psmouse->private; in trackpoint_set_int_attr()
129 err = trackpoint_write(&psmouse->ps2dev, attr->command, value); in trackpoint_set_int_attr()
144 static ssize_t trackpoint_set_bit_attr(struct psmouse *psmouse, void *data, in trackpoint_set_bit_attr() argument
147 struct trackpoint_data *tp = psmouse->private; in trackpoint_set_bit_attr()
162 err = trackpoint_toggle_bit(&psmouse->ps2dev, in trackpoint_set_bit_attr()
202 static bool trackpoint_is_attr_available(struct psmouse *psmouse, in trackpoint_is_attr_available() argument
205 struct trackpoint_data *tp = psmouse->private; in trackpoint_is_attr_available()
217 struct psmouse *psmouse = serio_get_drvdata(serio); in trackpoint_is_attr_visible() local
219 return trackpoint_is_attr_available(psmouse, attr) ? attr->mode : 0; in trackpoint_is_attr_visible()
267 static int trackpoint_start_protocol(struct psmouse *psmouse, in trackpoint_start_protocol() argument
273 error = ps2_command(&psmouse->ps2dev, in trackpoint_start_protocol()
299 static int trackpoint_sync(struct psmouse *psmouse, bool in_power_on_state) in trackpoint_sync() argument
301 struct trackpoint_data *tp = psmouse->private; in trackpoint_sync()
308 trackpoint_update_bit(&psmouse->ps2dev, TP_TOGGLE_TWOHAND, in trackpoint_sync()
311 trackpoint_update_bit(&psmouse->ps2dev, TP_TOGGLE_SOURCE_TAG, in trackpoint_sync()
314 trackpoint_update_bit(&psmouse->ps2dev, TP_TOGGLE_MB, in trackpoint_sync()
323 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, sensitivity); in trackpoint_sync()
324 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, inertia); in trackpoint_sync()
325 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, speed); in trackpoint_sync()
326 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, reach); in trackpoint_sync()
327 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, draghys); in trackpoint_sync()
328 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, mindrag); in trackpoint_sync()
329 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, thresh); in trackpoint_sync()
330 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, upthresh); in trackpoint_sync()
331 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, ztime); in trackpoint_sync()
332 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, jenks); in trackpoint_sync()
333 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, drift_time); in trackpoint_sync()
336 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, press_to_select); in trackpoint_sync()
337 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, skipback); in trackpoint_sync()
338 TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, ext_dev); in trackpoint_sync()
363 static void trackpoint_disconnect(struct psmouse *psmouse) in trackpoint_disconnect() argument
365 device_remove_group(&psmouse->ps2dev.serio->dev, in trackpoint_disconnect()
368 kfree(psmouse->private); in trackpoint_disconnect()
369 psmouse->private = NULL; in trackpoint_disconnect()
372 static int trackpoint_reconnect(struct psmouse *psmouse) in trackpoint_reconnect() argument
374 struct trackpoint_data *tp = psmouse->private; in trackpoint_reconnect()
378 error = trackpoint_start_protocol(psmouse, NULL, NULL); in trackpoint_reconnect()
383 trackpoint_power_on_reset(&psmouse->ps2dev) == 0; in trackpoint_reconnect()
385 error = trackpoint_sync(psmouse, was_reset); in trackpoint_reconnect()
392 int trackpoint_detect(struct psmouse *psmouse, bool set_properties) in trackpoint_detect() argument
394 struct ps2dev *ps2dev = &psmouse->ps2dev; in trackpoint_detect()
401 error = trackpoint_start_protocol(psmouse, &variant_id, &firmware_id); in trackpoint_detect()
416 psmouse->private = tp; in trackpoint_detect()
418 psmouse->vendor = trackpoint_variants[variant_id]; in trackpoint_detect()
419 psmouse->name = "TrackPoint"; in trackpoint_detect()
421 psmouse->reconnect = trackpoint_reconnect; in trackpoint_detect()
422 psmouse->disconnect = trackpoint_disconnect; in trackpoint_detect()
430 psmouse_warn(psmouse, in trackpoint_detect()
434 psmouse_warn(psmouse, in trackpoint_detect()
441 input_set_capability(psmouse->dev, EV_KEY, BTN_MIDDLE); in trackpoint_detect()
443 __set_bit(INPUT_PROP_POINTER, psmouse->dev->propbit); in trackpoint_detect()
444 __set_bit(INPUT_PROP_POINTING_STICK, psmouse->dev->propbit); in trackpoint_detect()
451 trackpoint_sync(psmouse, false); in trackpoint_detect()
456 psmouse_err(psmouse, in trackpoint_detect()
459 kfree(psmouse->private); in trackpoint_detect()
460 psmouse->private = NULL; in trackpoint_detect()
464 psmouse_info(psmouse, in trackpoint_detect()
466 psmouse->vendor, firmware_id, in trackpoint_detect()