Lines Matching refs:psmouse

28 			psmouse_printk(KERN_DEBUG, psmouse,		\
35 static int synaptics_send_cmd(struct psmouse *psmouse, unsigned char c, in synaptics_send_cmd() argument
38 if (ps2_sliced_command(&psmouse->ps2dev, c) || in synaptics_send_cmd()
39 ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_GETINFO)) { in synaptics_send_cmd()
40 psmouse_err(psmouse, "%s query 0x%02x failed.\n", __func__, c); in synaptics_send_cmd()
50 static int elantech_send_cmd(struct psmouse *psmouse, unsigned char c, in elantech_send_cmd() argument
53 struct ps2dev *ps2dev = &psmouse->ps2dev; in elantech_send_cmd()
58 psmouse_err(psmouse, "%s query 0x%02x failed.\n", __func__, c); in elantech_send_cmd()
68 static int elantech_ps2_command(struct psmouse *psmouse, in elantech_ps2_command() argument
71 struct ps2dev *ps2dev = &psmouse->ps2dev; in elantech_ps2_command()
72 struct elantech_data *etd = psmouse->private; in elantech_ps2_command()
87 psmouse_err(psmouse, "ps2 command 0x%02x failed.\n", command); in elantech_ps2_command()
95 static int elantech_read_reg_params(struct psmouse *psmouse, u8 reg, u8 *param) in elantech_read_reg_params() argument
97 if (elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_read_reg_params()
98 elantech_ps2_command(psmouse, NULL, ETP_REGISTER_READWRITE) || in elantech_read_reg_params()
99 elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_read_reg_params()
100 elantech_ps2_command(psmouse, NULL, reg) || in elantech_read_reg_params()
101 elantech_ps2_command(psmouse, param, PSMOUSE_CMD_GETINFO)) { in elantech_read_reg_params()
102 psmouse_err(psmouse, in elantech_read_reg_params()
113 static int elantech_write_reg_params(struct psmouse *psmouse, u8 reg, u8 *param) in elantech_write_reg_params() argument
115 if (elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg_params()
116 elantech_ps2_command(psmouse, NULL, ETP_REGISTER_READWRITE) || in elantech_write_reg_params()
117 elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg_params()
118 elantech_ps2_command(psmouse, NULL, reg) || in elantech_write_reg_params()
119 elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg_params()
120 elantech_ps2_command(psmouse, NULL, param[0]) || in elantech_write_reg_params()
121 elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg_params()
122 elantech_ps2_command(psmouse, NULL, param[1]) || in elantech_write_reg_params()
123 elantech_ps2_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE11)) { in elantech_write_reg_params()
124 psmouse_err(psmouse, in elantech_write_reg_params()
136 static int elantech_read_reg(struct psmouse *psmouse, unsigned char reg, in elantech_read_reg() argument
139 struct elantech_data *etd = psmouse->private; in elantech_read_reg()
151 if (ps2_sliced_command(&psmouse->ps2dev, ETP_REGISTER_READ) || in elantech_read_reg()
152 ps2_sliced_command(&psmouse->ps2dev, reg) || in elantech_read_reg()
153 ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_GETINFO)) { in elantech_read_reg()
159 if (elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_read_reg()
160 elantech_ps2_command(psmouse, NULL, ETP_REGISTER_READ) || in elantech_read_reg()
161 elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_read_reg()
162 elantech_ps2_command(psmouse, NULL, reg) || in elantech_read_reg()
163 elantech_ps2_command(psmouse, param, PSMOUSE_CMD_GETINFO)) { in elantech_read_reg()
169 if (elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_read_reg()
170 elantech_ps2_command(psmouse, NULL, ETP_REGISTER_READWRITE) || in elantech_read_reg()
171 elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_read_reg()
172 elantech_ps2_command(psmouse, NULL, reg) || in elantech_read_reg()
173 elantech_ps2_command(psmouse, param, PSMOUSE_CMD_GETINFO)) { in elantech_read_reg()
180 psmouse_err(psmouse, "failed to read register 0x%02x.\n", reg); in elantech_read_reg()
192 static int elantech_write_reg(struct psmouse *psmouse, unsigned char reg, in elantech_write_reg() argument
195 struct elantech_data *etd = psmouse->private; in elantech_write_reg()
206 if (ps2_sliced_command(&psmouse->ps2dev, ETP_REGISTER_WRITE) || in elantech_write_reg()
207 ps2_sliced_command(&psmouse->ps2dev, reg) || in elantech_write_reg()
208 ps2_sliced_command(&psmouse->ps2dev, val) || in elantech_write_reg()
209 ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_SETSCALE11)) { in elantech_write_reg()
215 if (elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg()
216 elantech_ps2_command(psmouse, NULL, ETP_REGISTER_WRITE) || in elantech_write_reg()
217 elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg()
218 elantech_ps2_command(psmouse, NULL, reg) || in elantech_write_reg()
219 elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg()
220 elantech_ps2_command(psmouse, NULL, val) || in elantech_write_reg()
221 elantech_ps2_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE11)) { in elantech_write_reg()
227 if (elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg()
228 elantech_ps2_command(psmouse, NULL, ETP_REGISTER_READWRITE) || in elantech_write_reg()
229 elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg()
230 elantech_ps2_command(psmouse, NULL, reg) || in elantech_write_reg()
231 elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg()
232 elantech_ps2_command(psmouse, NULL, val) || in elantech_write_reg()
233 elantech_ps2_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE11)) { in elantech_write_reg()
239 if (elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg()
240 elantech_ps2_command(psmouse, NULL, ETP_REGISTER_READWRITE) || in elantech_write_reg()
241 elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg()
242 elantech_ps2_command(psmouse, NULL, reg) || in elantech_write_reg()
243 elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg()
244 elantech_ps2_command(psmouse, NULL, ETP_REGISTER_READWRITE) || in elantech_write_reg()
245 elantech_ps2_command(psmouse, NULL, ETP_PS2_CUSTOM_COMMAND) || in elantech_write_reg()
246 elantech_ps2_command(psmouse, NULL, val) || in elantech_write_reg()
247 elantech_ps2_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE11)) { in elantech_write_reg()
254 psmouse_err(psmouse, in elantech_write_reg()
264 static void elantech_packet_dump(struct psmouse *psmouse) in elantech_packet_dump() argument
266 psmouse_printk(KERN_DEBUG, psmouse, "PS/2 packet [%*ph]\n", in elantech_packet_dump()
267 psmouse->pktsize, psmouse->packet); in elantech_packet_dump()
320 static void elantech_report_absolute_v1(struct psmouse *psmouse) in elantech_report_absolute_v1() argument
322 struct input_dev *dev = psmouse->dev; in elantech_report_absolute_v1()
323 struct elantech_data *etd = psmouse->private; in elantech_report_absolute_v1()
324 unsigned char *packet = psmouse->packet; in elantech_report_absolute_v1()
408 static void elantech_report_absolute_v2(struct psmouse *psmouse) in elantech_report_absolute_v2() argument
410 struct elantech_data *etd = psmouse->private; in elantech_report_absolute_v2()
411 struct input_dev *dev = psmouse->dev; in elantech_report_absolute_v2()
412 unsigned char *packet = psmouse->packet; in elantech_report_absolute_v2()
489 static void elantech_report_trackpoint(struct psmouse *psmouse, in elantech_report_trackpoint() argument
507 struct elantech_data *etd = psmouse->private; in elantech_report_trackpoint()
509 unsigned char *packet = psmouse->packet; in elantech_report_trackpoint()
548 elantech_packet_dump(psmouse); in elantech_report_trackpoint()
558 static void elantech_report_absolute_v3(struct psmouse *psmouse, in elantech_report_absolute_v3() argument
561 struct input_dev *dev = psmouse->dev; in elantech_report_absolute_v3()
562 struct elantech_data *etd = psmouse->private; in elantech_report_absolute_v3()
563 unsigned char *packet = psmouse->packet; in elantech_report_absolute_v3()
637 static void elantech_input_sync_v4(struct psmouse *psmouse) in elantech_input_sync_v4() argument
639 struct input_dev *dev = psmouse->dev; in elantech_input_sync_v4()
640 struct elantech_data *etd = psmouse->private; in elantech_input_sync_v4()
641 unsigned char *packet = psmouse->packet; in elantech_input_sync_v4()
653 static void process_packet_status_v4(struct psmouse *psmouse) in process_packet_status_v4() argument
655 struct input_dev *dev = psmouse->dev; in process_packet_status_v4()
656 unsigned char *packet = psmouse->packet; in process_packet_status_v4()
669 elantech_input_sync_v4(psmouse); in process_packet_status_v4()
672 static void process_packet_head_v4(struct psmouse *psmouse) in process_packet_head_v4() argument
674 struct input_dev *dev = psmouse->dev; in process_packet_head_v4()
675 struct elantech_data *etd = psmouse->private; in process_packet_head_v4()
676 unsigned char *packet = psmouse->packet; in process_packet_head_v4()
699 elantech_input_sync_v4(psmouse); in process_packet_head_v4()
702 static void process_packet_motion_v4(struct psmouse *psmouse) in process_packet_motion_v4() argument
704 struct input_dev *dev = psmouse->dev; in process_packet_motion_v4()
705 struct elantech_data *etd = psmouse->private; in process_packet_motion_v4()
706 unsigned char *packet = psmouse->packet; in process_packet_motion_v4()
740 elantech_input_sync_v4(psmouse); in process_packet_motion_v4()
743 static void elantech_report_absolute_v4(struct psmouse *psmouse, in elantech_report_absolute_v4() argument
748 process_packet_status_v4(psmouse); in elantech_report_absolute_v4()
752 process_packet_head_v4(psmouse); in elantech_report_absolute_v4()
756 process_packet_motion_v4(psmouse); in elantech_report_absolute_v4()
766 static int elantech_packet_check_v1(struct psmouse *psmouse) in elantech_packet_check_v1() argument
768 struct elantech_data *etd = psmouse->private; in elantech_packet_check_v1()
769 unsigned char *packet = psmouse->packet; in elantech_packet_check_v1()
790 static int elantech_debounce_check_v2(struct psmouse *psmouse) in elantech_debounce_check_v2() argument
799 unsigned char *packet = psmouse->packet; in elantech_debounce_check_v2()
804 static int elantech_packet_check_v2(struct psmouse *psmouse) in elantech_packet_check_v2() argument
806 struct elantech_data *etd = psmouse->private; in elantech_packet_check_v2()
807 unsigned char *packet = psmouse->packet; in elantech_packet_check_v2()
836 static int elantech_packet_check_v3(struct psmouse *psmouse) in elantech_packet_check_v3() argument
838 struct elantech_data *etd = psmouse->private; in elantech_packet_check_v3()
842 unsigned char *packet = psmouse->packet; in elantech_packet_check_v3()
874 static int elantech_packet_check_v4(struct psmouse *psmouse) in elantech_packet_check_v4() argument
876 struct elantech_data *etd = psmouse->private; in elantech_packet_check_v4()
877 unsigned char *packet = psmouse->packet; in elantech_packet_check_v4()
923 static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse) in elantech_process_byte() argument
925 struct elantech_data *etd = psmouse->private; in elantech_process_byte()
928 if (psmouse->pktcnt < psmouse->pktsize) in elantech_process_byte()
932 elantech_packet_dump(psmouse); in elantech_process_byte()
936 if (etd->info.paritycheck && !elantech_packet_check_v1(psmouse)) in elantech_process_byte()
939 elantech_report_absolute_v1(psmouse); in elantech_process_byte()
944 if (elantech_debounce_check_v2(psmouse)) in elantech_process_byte()
947 if (etd->info.paritycheck && !elantech_packet_check_v2(psmouse)) in elantech_process_byte()
950 elantech_report_absolute_v2(psmouse); in elantech_process_byte()
954 packet_type = elantech_packet_check_v3(psmouse); in elantech_process_byte()
964 elantech_report_trackpoint(psmouse, packet_type); in elantech_process_byte()
968 elantech_report_absolute_v3(psmouse, packet_type); in elantech_process_byte()
975 packet_type = elantech_packet_check_v4(psmouse); in elantech_process_byte()
981 elantech_report_trackpoint(psmouse, packet_type); in elantech_process_byte()
985 elantech_report_absolute_v4(psmouse, packet_type); in elantech_process_byte()
1000 static void elantech_set_rate_restore_reg_07(struct psmouse *psmouse, in elantech_set_rate_restore_reg_07() argument
1003 struct elantech_data *etd = psmouse->private; in elantech_set_rate_restore_reg_07()
1005 etd->original_set_rate(psmouse, rate); in elantech_set_rate_restore_reg_07()
1006 if (elantech_write_reg(psmouse, 0x07, etd->reg_07)) in elantech_set_rate_restore_reg_07()
1007 psmouse_err(psmouse, "restoring reg_07 failed\n"); in elantech_set_rate_restore_reg_07()
1013 static int elantech_set_absolute_mode(struct psmouse *psmouse) in elantech_set_absolute_mode() argument
1015 struct elantech_data *etd = psmouse->private; in elantech_set_absolute_mode()
1024 if (elantech_write_reg(psmouse, 0x10, etd->reg_10) || in elantech_set_absolute_mode()
1025 elantech_write_reg(psmouse, 0x11, etd->reg_11)) { in elantech_set_absolute_mode()
1035 if (elantech_write_reg(psmouse, 0x10, etd->reg_10) || in elantech_set_absolute_mode()
1036 elantech_write_reg(psmouse, 0x11, etd->reg_11) || in elantech_set_absolute_mode()
1037 elantech_write_reg(psmouse, 0x21, etd->reg_21)) { in elantech_set_absolute_mode()
1048 if (elantech_write_reg(psmouse, 0x10, etd->reg_10)) in elantech_set_absolute_mode()
1055 if (elantech_write_reg(psmouse, 0x07, etd->reg_07)) in elantech_set_absolute_mode()
1069 rc = elantech_read_reg(psmouse, 0x10, &val); in elantech_set_absolute_mode()
1078 psmouse_err(psmouse, in elantech_set_absolute_mode()
1082 psmouse_err(psmouse, in elantech_set_absolute_mode()
1090 psmouse_err(psmouse, "failed to initialise registers.\n"); in elantech_set_absolute_mode()
1104 static int elantech_get_resolution_v4(struct psmouse *psmouse, in elantech_get_resolution_v4() argument
1111 if (elantech_send_cmd(psmouse, ETP_RESOLUTION_QUERY, param)) in elantech_get_resolution_v4()
1121 static void elantech_set_buttonpad_prop(struct psmouse *psmouse) in elantech_set_buttonpad_prop() argument
1123 struct input_dev *dev = psmouse->dev; in elantech_set_buttonpad_prop()
1124 struct elantech_data *etd = psmouse->private; in elantech_set_buttonpad_prop()
1165 static int elantech_set_input_params(struct psmouse *psmouse) in elantech_set_input_params() argument
1167 struct input_dev *dev = psmouse->dev; in elantech_set_input_params()
1168 struct elantech_data *etd = psmouse->private; in elantech_set_input_params()
1207 elantech_set_buttonpad_prop(psmouse); in elantech_set_input_params()
1222 elantech_set_buttonpad_prop(psmouse); in elantech_set_input_params()
1271 static ssize_t elantech_show_int_attr(struct psmouse *psmouse, void *data, in elantech_show_int_attr() argument
1274 struct elantech_data *etd = psmouse->private; in elantech_show_int_attr()
1280 rc = elantech_read_reg(psmouse, attr->reg, reg); in elantech_show_int_attr()
1288 static ssize_t elantech_set_int_attr(struct psmouse *psmouse, in elantech_set_int_attr() argument
1291 struct elantech_data *etd = psmouse->private; in elantech_set_int_attr()
1311 if (!attr->reg || elantech_write_reg(psmouse, attr->reg, value) == 0) in elantech_set_int_attr()
1402 int elantech_detect(struct psmouse *psmouse, bool set_properties) in elantech_detect() argument
1404 struct ps2dev *ps2dev = &psmouse->ps2dev; in elantech_detect()
1414 psmouse_dbg(psmouse, "sending Elantech magic knock failed.\n"); in elantech_detect()
1424 psmouse_dbg(psmouse, in elantech_detect()
1435 if (synaptics_send_cmd(psmouse, ETP_FW_VERSION_QUERY, param)) { in elantech_detect()
1436 psmouse_dbg(psmouse, "failed to query firmware version.\n"); in elantech_detect()
1440 psmouse_dbg(psmouse, in elantech_detect()
1445 psmouse_dbg(psmouse, in elantech_detect()
1451 psmouse->vendor = "Elantech"; in elantech_detect()
1452 psmouse->name = "Touchpad"; in elantech_detect()
1461 static void elantech_disconnect(struct psmouse *psmouse) in elantech_disconnect() argument
1463 struct elantech_data *etd = psmouse->private; in elantech_disconnect()
1469 psmouse_smbus_cleanup(psmouse); in elantech_disconnect()
1473 sysfs_remove_group(&psmouse->ps2dev.serio->dev.kobj, in elantech_disconnect()
1475 kfree(psmouse->private); in elantech_disconnect()
1476 psmouse->private = NULL; in elantech_disconnect()
1482 static int elantech_reconnect(struct psmouse *psmouse) in elantech_reconnect() argument
1484 psmouse_reset(psmouse); in elantech_reconnect()
1486 if (elantech_detect(psmouse, 0)) in elantech_reconnect()
1489 if (elantech_set_absolute_mode(psmouse)) { in elantech_reconnect()
1490 psmouse_err(psmouse, in elantech_reconnect()
1590 static int elantech_change_report_id(struct psmouse *psmouse) in elantech_change_report_id() argument
1600 if (elantech_write_reg_params(psmouse, 0x7, param) || in elantech_change_report_id()
1601 elantech_read_reg_params(psmouse, 0x7, param) || in elantech_change_report_id()
1603 psmouse_err(psmouse, "Unable to change report ID to 0x5f.\n"); in elantech_change_report_id()
1678 static int elantech_query_info(struct psmouse *psmouse, in elantech_query_info() argument
1690 if (synaptics_send_cmd(psmouse, ETP_FW_VERSION_QUERY, param)) { in elantech_query_info()
1691 psmouse_err(psmouse, "failed to query firmware version.\n"); in elantech_query_info()
1697 psmouse_err(psmouse, "unknown hardware version, aborting...\n"); in elantech_query_info()
1700 psmouse_info(psmouse, in elantech_query_info()
1704 if (info->send_cmd(psmouse, ETP_CAPABILITIES_QUERY, in elantech_query_info()
1706 psmouse_err(psmouse, "failed to query capabilities.\n"); in elantech_query_info()
1709 psmouse_info(psmouse, in elantech_query_info()
1715 if (info->send_cmd(psmouse, ETP_SAMPLE_QUERY, info->samples)) { in elantech_query_info()
1716 psmouse_err(psmouse, "failed to query sample data\n"); in elantech_query_info()
1719 psmouse_info(psmouse, in elantech_query_info()
1727 if (info->send_cmd(psmouse, ETP_ICBODY_QUERY, ic_body)) { in elantech_query_info()
1728 psmouse_err(psmouse, "failed to query ic body\n"); in elantech_query_info()
1732 psmouse_info(psmouse, in elantech_query_info()
1747 psmouse_info(psmouse, in elantech_query_info()
1765 if (elantech_change_report_id(psmouse)) { in elantech_query_info()
1766 psmouse_info(psmouse, in elantech_query_info()
1775 if (elantech_get_resolution_v4(psmouse, in elantech_query_info()
1779 psmouse_warn(psmouse, in elantech_query_info()
1808 if (info->send_cmd(psmouse, ETP_FW_ID_QUERY, param)) in elantech_query_info()
1814 if (info->send_cmd(psmouse, ETP_SAMPLE_QUERY, param)) in elantech_query_info()
1833 if (info->send_cmd(psmouse, ETP_FW_ID_QUERY, param)) in elantech_query_info()
1841 if (info->send_cmd(psmouse, ETP_FW_ID_QUERY, param)) in elantech_query_info()
1897 static int elantech_create_smbus(struct psmouse *psmouse, in elantech_create_smbus() argument
1943 return psmouse_smbus_init(psmouse, &smbus_board, NULL, 0, false, in elantech_create_smbus()
1951 static int elantech_setup_smbus(struct psmouse *psmouse, in elantech_setup_smbus() argument
1967 psmouse_matches_pnp_id(psmouse, i2c_blacklist_pnp_ids)) in elantech_setup_smbus()
1971 psmouse_info(psmouse, "Trying to set up SMBus access\n"); in elantech_setup_smbus()
1973 error = elantech_create_smbus(psmouse, info, leave_breadcrumbs); in elantech_setup_smbus()
1976 psmouse_info(psmouse, "SMbus companion is not ready yet\n"); in elantech_setup_smbus()
1978 psmouse_err(psmouse, "unable to create intertouch device\n"); in elantech_setup_smbus()
1986 static bool elantech_use_host_notify(struct psmouse *psmouse, in elantech_use_host_notify() argument
1998 psmouse_dbg(psmouse, "Ignoring SMBus provider through alert protocol.\n"); in elantech_use_host_notify()
2004 psmouse_dbg(psmouse, in elantech_use_host_notify()
2012 int elantech_init_smbus(struct psmouse *psmouse) in elantech_init_smbus() argument
2017 psmouse_reset(psmouse); in elantech_init_smbus()
2019 error = elantech_query_info(psmouse, &info); in elantech_init_smbus()
2028 return elantech_create_smbus(psmouse, &info, false); in elantech_init_smbus()
2030 psmouse_reset(psmouse); in elantech_init_smbus()
2038 static int elantech_setup_ps2(struct psmouse *psmouse, in elantech_setup_ps2() argument
2046 psmouse->private = etd = kzalloc(sizeof(*etd), GFP_KERNEL); in elantech_setup_ps2()
2056 if (elantech_set_absolute_mode(psmouse)) { in elantech_setup_ps2()
2057 psmouse_err(psmouse, in elantech_setup_ps2()
2063 etd->original_set_rate = psmouse->set_rate; in elantech_setup_ps2()
2064 psmouse->set_rate = elantech_set_rate_restore_reg_07; in elantech_setup_ps2()
2067 if (elantech_set_input_params(psmouse)) { in elantech_setup_ps2()
2068 psmouse_err(psmouse, "failed to query touchpad range.\n"); in elantech_setup_ps2()
2072 error = sysfs_create_group(&psmouse->ps2dev.serio->dev.kobj, in elantech_setup_ps2()
2075 psmouse_err(psmouse, in elantech_setup_ps2()
2091 psmouse->ps2dev.serio->phys); in elantech_setup_ps2()
2098 tp_dev->dev.parent = &psmouse->ps2dev.serio->dev; in elantech_setup_ps2()
2114 psmouse->protocol_handler = elantech_process_byte; in elantech_setup_ps2()
2115 psmouse->disconnect = elantech_disconnect; in elantech_setup_ps2()
2116 psmouse->reconnect = elantech_reconnect; in elantech_setup_ps2()
2117 psmouse->fast_reconnect = NULL; in elantech_setup_ps2()
2118 psmouse->pktsize = info->hw_version > 1 ? 6 : 4; in elantech_setup_ps2()
2124 sysfs_remove_group(&psmouse->ps2dev.serio->dev.kobj, in elantech_setup_ps2()
2131 int elantech_init_ps2(struct psmouse *psmouse) in elantech_init_ps2() argument
2136 psmouse_reset(psmouse); in elantech_init_ps2()
2138 error = elantech_query_info(psmouse, &info); in elantech_init_ps2()
2142 error = elantech_setup_ps2(psmouse, &info); in elantech_init_ps2()
2148 psmouse_reset(psmouse); in elantech_init_ps2()
2152 int elantech_init(struct psmouse *psmouse) in elantech_init() argument
2157 psmouse_reset(psmouse); in elantech_init()
2159 error = elantech_query_info(psmouse, &info); in elantech_init()
2165 if (elantech_use_host_notify(psmouse, &info)) { in elantech_init()
2168 psmouse_warn(psmouse, in elantech_init()
2172 error = elantech_setup_smbus(psmouse, &info, true); in elantech_init()
2179 error = elantech_setup_ps2(psmouse, &info); in elantech_init()
2185 psmouse_smbus_cleanup(psmouse); in elantech_init()
2191 psmouse_reset(psmouse); in elantech_init()