Lines Matching refs:etd

27 		if (etd->info.debug)					\
72 struct elantech_data *etd = psmouse->private;
139 struct elantech_data *etd = psmouse->private;
149 switch (etd->info.hw_version) {
181 else if (etd->info.hw_version != 4)
195 struct elantech_data *etd = psmouse->private;
204 switch (etd->info.hw_version) {
323 struct elantech_data *etd = psmouse->private;
327 if (etd->info.fw_version < 0x020000) {
342 if (etd->info.jumpy_cursor) {
344 etd->single_finger_reports = 0;
345 } else if (etd->single_finger_reports < 2) {
347 etd->single_finger_reports++;
363 etd->y_max - (((packet[1] & 0x03) << 8) | packet[3]));
372 if (etd->info.fw_version < 0x020000 &&
373 (etd->info.capabilities[0] & ETP_CAP_HAS_ROCKER)) {
410 struct elantech_data *etd = psmouse->private;
438 y1 = etd->y_max - (((packet[4] & 0x0f) << 8) | packet[5]);
453 y1 = etd->y_max -
461 y2 = etd->y_max -
481 if (etd->info.reports_pressure) {
507 struct elantech_data *etd = psmouse->private;
508 struct input_dev *tp_dev = etd->tp_dev;
547 if (etd->info.debug == 1)
562 struct elantech_data *etd = psmouse->private;
582 y1 = etd->y_max - (((packet[4] & 0x0f) << 8) | packet[5]);
591 etd->mt[0].x = ((packet[1] & 0x0f) << 8) | packet[2];
596 etd->mt[0].y = etd->y_max -
605 x1 = etd->mt[0].x;
606 y1 = etd->mt[0].y;
608 y2 = etd->y_max - (((packet[4] & 0x0f) << 8) | packet[5]);
626 if (elantech_is_buttonpad(&etd->info))
640 struct elantech_data *etd = psmouse->private;
644 if (elantech_is_buttonpad(&etd->info))
675 struct elantech_data *etd = psmouse->private;
684 etd->mt[id].x = ((packet[1] & 0x0f) << 8) | packet[2];
685 etd->mt[id].y = etd->y_max - (((packet[4] & 0x0f) << 8) | packet[5]);
692 input_report_abs(dev, ABS_MT_POSITION_X, etd->mt[id].x);
693 input_report_abs(dev, ABS_MT_POSITION_Y, etd->mt[id].y);
695 input_report_abs(dev, ABS_MT_TOUCH_MAJOR, traces * etd->width);
705 struct elantech_data *etd = psmouse->private;
726 etd->mt[id].x += delta_x1 * weight;
727 etd->mt[id].y -= delta_y1 * weight;
729 input_report_abs(dev, ABS_MT_POSITION_X, etd->mt[id].x);
730 input_report_abs(dev, ABS_MT_POSITION_Y, etd->mt[id].y);
733 etd->mt[sid].x += delta_x2 * weight;
734 etd->mt[sid].y -= delta_y2 * weight;
736 input_report_abs(dev, ABS_MT_POSITION_X, etd->mt[sid].x);
737 input_report_abs(dev, ABS_MT_POSITION_Y, etd->mt[sid].y);
768 struct elantech_data *etd = psmouse->private;
773 if (etd->info.fw_version < 0x020000) {
785 return etd->parity[packet[1]] == p1 &&
786 etd->parity[packet[2]] == p2 &&
787 etd->parity[packet[3]] == p3;
806 struct elantech_data *etd = psmouse->private;
818 if (etd->info.reports_pressure)
838 struct elantech_data *etd = psmouse->private;
855 if (etd->info.crc_enabled) {
876 struct elantech_data *etd = psmouse->private;
882 if (etd->tp_dev && (packet[3] & 0x0f) == 0x06)
886 ic_version = (etd->info.fw_version & 0x0f0000) >> 16;
895 if (etd->info.crc_enabled)
897 else if (ic_version == 7 && etd->info.samples[1] == 0x2A)
925 struct elantech_data *etd = psmouse->private;
931 if (etd->info.debug > 1)
934 switch (etd->info.hw_version) {
936 if (etd->info.paritycheck && !elantech_packet_check_v1(psmouse))
947 if (etd->info.paritycheck && !elantech_packet_check_v2(psmouse))
1003 struct elantech_data *etd = psmouse->private;
1005 etd->original_set_rate(psmouse, rate);
1006 if (elantech_write_reg(psmouse, 0x07, etd->reg_07))
1015 struct elantech_data *etd = psmouse->private;
1020 switch (etd->info.hw_version) {
1022 etd->reg_10 = 0x16;
1023 etd->reg_11 = 0x8f;
1024 if (elantech_write_reg(psmouse, 0x10, etd->reg_10) ||
1025 elantech_write_reg(psmouse, 0x11, etd->reg_11)) {
1032 etd->reg_10 = 0x54;
1033 etd->reg_11 = 0x88; /* 0x8a */
1034 etd->reg_21 = 0x60; /* 0x00 */
1035 if (elantech_write_reg(psmouse, 0x10, etd->reg_10) ||
1036 elantech_write_reg(psmouse, 0x11, etd->reg_11) ||
1037 elantech_write_reg(psmouse, 0x21, etd->reg_21)) {
1043 if (etd->info.set_hw_resolution)
1044 etd->reg_10 = 0x0b;
1046 etd->reg_10 = 0x01;
1048 if (elantech_write_reg(psmouse, 0x10, etd->reg_10))
1054 etd->reg_07 = 0x01;
1055 if (elantech_write_reg(psmouse, 0x07, etd->reg_07))
1080 } else if (etd->info.hw_version == 1 &&
1124 struct elantech_data *etd = psmouse->private;
1126 if (elantech_is_buttonpad(&etd->info)) {
1168 struct elantech_data *etd = psmouse->private;
1169 struct elantech_device_info *info = &etd->info;
1257 etd->y_max = y_max;
1258 etd->width = width;
1274 struct elantech_data *etd = psmouse->private;
1276 unsigned char *reg = (unsigned char *) etd + attr->field_offset;
1291 struct elantech_data *etd = psmouse->private;
1293 unsigned char *reg = (unsigned char *) etd + attr->field_offset;
1302 if (etd->info.hw_version == 1) {
1463 struct elantech_data *etd = psmouse->private;
1471 if (etd->tp_dev)
1472 input_unregister_device(etd->tp_dev);
2072 struct elantech_data *etd;
2077 psmouse->private = etd = kzalloc(sizeof(*etd), GFP_KERNEL);
2078 if (!etd)
2081 etd->info = *info;
2083 etd->parity[0] = 1;
2085 etd->parity[i] = etd->parity[i & (i - 1)] ^ 1;
2094 etd->original_set_rate = psmouse->set_rate;
2120 etd->tp_dev = tp_dev;
2121 snprintf(etd->tp_phys, sizeof(etd->tp_phys), "%s/input1",
2123 tp_dev->phys = etd->tp_phys;
2140 error = input_register_device(etd->tp_dev);
2158 kfree(etd);