Lines Matching refs:packet
226 psmouse->pktsize, psmouse->packet); in elantech_packet_dump()
283 unsigned char *packet = psmouse->packet; in elantech_report_absolute_v1() local
291 fingers = ((packet[1] & 0x80) >> 7) + in elantech_report_absolute_v1()
292 ((packet[1] & 0x30) >> 4); in elantech_report_absolute_v1()
298 fingers = (packet[0] & 0xc0) >> 6; in elantech_report_absolute_v1()
320 ((packet[1] & 0x0c) << 6) | packet[2]); in elantech_report_absolute_v1()
322 etd->y_max - (((packet[1] & 0x03) << 8) | packet[3])); in elantech_report_absolute_v1()
329 psmouse_report_standard_buttons(dev, packet[0]); in elantech_report_absolute_v1()
334 input_report_key(dev, BTN_FORWARD, packet[0] & 0x40); in elantech_report_absolute_v1()
336 input_report_key(dev, BTN_BACK, packet[0] & 0x80); in elantech_report_absolute_v1()
371 unsigned char *packet = psmouse->packet; in elantech_report_absolute_v2() local
376 fingers = (packet[0] & 0xc0) >> 6; in elantech_report_absolute_v2()
384 if (packet[3] & 0x80) in elantech_report_absolute_v2()
392 x1 = ((packet[1] & 0x0f) << 8) | packet[2]; in elantech_report_absolute_v2()
397 y1 = etd->y_max - (((packet[4] & 0x0f) << 8) | packet[5]); in elantech_report_absolute_v2()
399 pres = (packet[1] & 0xf0) | ((packet[4] & 0xf0) >> 4); in elantech_report_absolute_v2()
400 width = ((packet[0] & 0x30) >> 2) | ((packet[3] & 0x30) >> 4); in elantech_report_absolute_v2()
410 x1 = (((packet[0] & 0x10) << 4) | packet[1]) << 2; in elantech_report_absolute_v2()
413 ((((packet[0] & 0x20) << 3) | packet[2]) << 2); in elantech_report_absolute_v2()
418 x2 = (((packet[3] & 0x10) << 4) | packet[4]) << 2; in elantech_report_absolute_v2()
421 ((((packet[3] & 0x20) << 3) | packet[5]) << 2); in elantech_report_absolute_v2()
439 psmouse_report_standard_buttons(dev, packet[0]); in elantech_report_absolute_v2()
468 unsigned char *packet = psmouse->packet; in elantech_report_trackpoint() local
472 t = get_unaligned_le32(&packet[0]); in elantech_report_trackpoint()
479 x = packet[4] - (int)((packet[1]^0x80) << 1); in elantech_report_trackpoint()
480 y = (int)((packet[2]^0x80) << 1) - packet[5]; in elantech_report_trackpoint()
482 psmouse_report_standard_buttons(tp_dev, packet[0]); in elantech_report_trackpoint()
509 unsigned char *packet = psmouse->packet; in elantech_report_absolute_v3() local
514 fingers = (packet[0] & 0xc0) >> 6; in elantech_report_absolute_v3()
523 x1 = ((packet[1] & 0x0f) << 8) | packet[2]; in elantech_report_absolute_v3()
528 y1 = etd->y_max - (((packet[4] & 0x0f) << 8) | packet[5]); in elantech_report_absolute_v3()
537 etd->mt[0].x = ((packet[1] & 0x0f) << 8) | packet[2]; in elantech_report_absolute_v3()
543 (((packet[4] & 0x0f) << 8) | packet[5]); in elantech_report_absolute_v3()
553 x2 = ((packet[1] & 0x0f) << 8) | packet[2]; in elantech_report_absolute_v3()
554 y2 = etd->y_max - (((packet[4] & 0x0f) << 8) | packet[5]); in elantech_report_absolute_v3()
558 pres = (packet[1] & 0xf0) | ((packet[4] & 0xf0) >> 4); in elantech_report_absolute_v3()
559 width = ((packet[0] & 0x30) >> 2) | ((packet[3] & 0x30) >> 4); in elantech_report_absolute_v3()
573 input_report_key(dev, BTN_LEFT, packet[0] & 0x03); in elantech_report_absolute_v3()
575 psmouse_report_standard_buttons(dev, packet[0]); in elantech_report_absolute_v3()
587 unsigned char *packet = psmouse->packet; in elantech_input_sync_v4() local
591 input_report_key(dev, BTN_LEFT, packet[0] & 0x03); in elantech_input_sync_v4()
593 psmouse_report_standard_buttons(dev, packet[0]); in elantech_input_sync_v4()
602 unsigned char *packet = psmouse->packet; in process_packet_status_v4() local
607 fingers = packet[1] & 0x1f; in process_packet_status_v4()
622 unsigned char *packet = psmouse->packet; in process_packet_head_v4() local
623 int id = ((packet[3] & 0xe0) >> 5) - 1; in process_packet_head_v4()
629 etd->mt[id].x = ((packet[1] & 0x0f) << 8) | packet[2]; in process_packet_head_v4()
630 etd->mt[id].y = etd->y_max - (((packet[4] & 0x0f) << 8) | packet[5]); in process_packet_head_v4()
631 pres = (packet[1] & 0xf0) | ((packet[4] & 0xf0) >> 4); in process_packet_head_v4()
632 traces = (packet[0] & 0xf0) >> 4; in process_packet_head_v4()
651 unsigned char *packet = psmouse->packet; in process_packet_motion_v4() local
655 id = ((packet[0] & 0xe0) >> 5) - 1; in process_packet_motion_v4()
659 sid = ((packet[3] & 0xe0) >> 5) - 1; in process_packet_motion_v4()
660 weight = (packet[0] & 0x10) ? ETP_WEIGHT_VALUE : 1; in process_packet_motion_v4()
666 delta_x1 = (signed char)packet[1]; in process_packet_motion_v4()
667 delta_y1 = (signed char)packet[2]; in process_packet_motion_v4()
668 delta_x2 = (signed char)packet[4]; in process_packet_motion_v4()
669 delta_y2 = (signed char)packet[5]; in process_packet_motion_v4()
714 unsigned char *packet = psmouse->packet; in elantech_packet_check_v1() local
720 p1 = (packet[0] & 0x20) >> 5; in elantech_packet_check_v1()
721 p2 = (packet[0] & 0x10) >> 4; in elantech_packet_check_v1()
724 p1 = (packet[0] & 0x10) >> 4; in elantech_packet_check_v1()
725 p2 = (packet[0] & 0x20) >> 5; in elantech_packet_check_v1()
728 p3 = (packet[0] & 0x04) >> 2; in elantech_packet_check_v1()
730 return etd->parity[packet[1]] == p1 && in elantech_packet_check_v1()
731 etd->parity[packet[2]] == p2 && in elantech_packet_check_v1()
732 etd->parity[packet[3]] == p3; in elantech_packet_check_v1()
744 unsigned char *packet = psmouse->packet; in elantech_debounce_check_v2() local
746 return !memcmp(packet, debounce_packet, sizeof(debounce_packet)); in elantech_debounce_check_v2()
752 unsigned char *packet = psmouse->packet; in elantech_packet_check_v2() local
764 return (packet[0] & 0x0c) == 0x04 && in elantech_packet_check_v2()
765 (packet[3] & 0x0f) == 0x02; in elantech_packet_check_v2()
767 if ((packet[0] & 0xc0) == 0x80) in elantech_packet_check_v2()
768 return (packet[0] & 0x0c) == 0x0c && in elantech_packet_check_v2()
769 (packet[3] & 0x0e) == 0x08; in elantech_packet_check_v2()
771 return (packet[0] & 0x3c) == 0x3c && in elantech_packet_check_v2()
772 (packet[1] & 0xf0) == 0x00 && in elantech_packet_check_v2()
773 (packet[3] & 0x3e) == 0x38 && in elantech_packet_check_v2()
774 (packet[4] & 0xf0) == 0x00; in elantech_packet_check_v2()
787 unsigned char *packet = psmouse->packet; in elantech_packet_check_v3() local
793 if (!memcmp(packet, debounce_packet, sizeof(debounce_packet))) in elantech_packet_check_v3()
801 if ((packet[3] & 0x09) == 0x08) in elantech_packet_check_v3()
804 if ((packet[3] & 0x09) == 0x09) in elantech_packet_check_v3()
807 if ((packet[0] & 0x0c) == 0x04 && (packet[3] & 0xcf) == 0x02) in elantech_packet_check_v3()
810 if ((packet[0] & 0x0c) == 0x0c && (packet[3] & 0xce) == 0x0c) in elantech_packet_check_v3()
812 if ((packet[3] & 0x0f) == 0x06) in elantech_packet_check_v3()
822 unsigned char *packet = psmouse->packet; in elantech_packet_check_v4() local
823 unsigned char packet_type = packet[3] & 0x03; in elantech_packet_check_v4()
827 if (etd->tp_dev && (packet[3] & 0x0f) == 0x06) in elantech_packet_check_v4()
841 sanity_check = ((packet[3] & 0x08) == 0x00); in elantech_packet_check_v4()
843 sanity_check = ((packet[3] & 0x1c) == 0x10); in elantech_packet_check_v4()
845 sanity_check = ((packet[0] & 0x08) == 0x00 && in elantech_packet_check_v4()
846 (packet[3] & 0x1c) == 0x10); in elantech_packet_check_v4()