Lines Matching refs:packet

27 #define	GET_ABS_X(packet)	((packet[1] << 2) | ((packet[3] >> 2) & 0x03))
28 #define GET_ABS_Y(packet) ((packet[2] << 2) | (packet[3] & 0x03))
407 /* reconfigure horizontal scrolling packet output */
636 static void fsp_packet_debug(struct psmouse *psmouse, unsigned char packet[])
644 /* Interpret & dump the packet data. */
645 switch (packet[0] >> FSP_PKT_TYPE_SHIFT) {
648 abs_x = GET_ABS_X(packet);
649 abs_y = GET_ABS_Y(packet);
668 packet[0], packet[1], packet[2], packet[3], abs_x, abs_y);
677 static void fsp_packet_debug(struct psmouse *psmouse, unsigned char packet[])
697 unsigned char *packet = psmouse->packet;
705 * Full packet accumulated, process it
708 fsp_packet_debug(psmouse, packet);
710 switch (psmouse->packet[0] >> FSP_PKT_TYPE_SHIFT) {
713 if ((packet[0] == 0x48 || packet[0] == 0x49) &&
714 packet[1] == 0 && packet[2] == 0) {
720 packet[3] &= 0xf0;
723 abs_x = GET_ABS_X(packet);
724 abs_y = GET_ABS_Y(packet);
726 if (packet[0] & FSP_PB0_MFMC) {
728 * MFMC packet: assume that there are two fingers on
733 /* MFMC packet */
734 if (packet[0] & FSP_PB0_MFMC_FGR2) {
763 /* SFAC packet */
764 if ((packet[0] & (FSP_PB0_LBTN|FSP_PB0_PHY_BTN)) ==
770 packet[0] &= ~FSP_PB0_LBTN;
782 if (fgrs == 1 || (fgrs == 2 && !(packet[0] & FSP_PB0_MFMC_FGR2))) {
786 input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
787 input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
796 packet[0] &= ~FSP_PB0_LBTN;
800 /* normal packet */
801 /* special packet data translation from on-pad packets */
802 if (packet[3] != 0) {
803 if (packet[3] & BIT(0))
805 if (packet[3] & BIT(1))
807 if (packet[3] & BIT(2))
809 if (packet[3] & BIT(3))
811 /* push back to packet queue */
813 packet[3] = button_status;
814 rscroll = (packet[3] >> 4) & 1;
815 lscroll = (packet[3] >> 5) & 1;
821 (int)(packet[3] & 8) - (int)(packet[3] & 7));
829 psmouse_report_standard_packet(dev, packet);
859 "Unable to enable 4 bytes packet format.\n");