Lines Matching defs:packet
128 void psmouse_report_standard_motion(struct input_dev *dev, u8 *packet)
132 x = packet[1] ? packet[1] - ((packet[0] << 4) & 0x100) : 0;
133 y = packet[2] ? packet[2] - ((packet[0] << 3) & 0x100) : 0;
139 void psmouse_report_standard_packet(struct input_dev *dev, u8 *packet)
141 psmouse_report_standard_buttons(dev, packet[0]);
142 psmouse_report_standard_motion(dev, packet);
147 * relevant events to the input module once full packet has arrived.
152 u8 *packet = psmouse->packet;
158 /* Full packet accumulated, process it */
163 input_report_rel(dev, REL_WHEEL, -(s8) packet[3]);
168 switch (packet[3] & 0xC0) {
171 -sign_extend32(packet[3], 5));
175 -sign_extend32(packet[3], 5));
179 wheel = sign_extend32(packet[3], 3);
191 input_report_key(dev, BTN_SIDE, packet[3] & BIT(4));
192 input_report_key(dev, BTN_EXTRA, packet[3] & BIT(5));
199 input_report_rel(dev, REL_WHEEL, -(s8) packet[3]);
202 input_report_key(dev, BTN_SIDE, packet[0] & BIT(6));
203 input_report_key(dev, BTN_EXTRA, packet[0] & BIT(7));
208 input_report_key(dev, BTN_EXTRA, packet[0] & BIT(3));
214 packet[1] |= (packet[0] & 0x40) << 1;
222 input_report_key(dev, BTN_SIDE, packet[0] & BIT(3));
223 packet[0] |= BIT(3);
231 packet[0] |= psmouse->extra_buttons;
232 psmouse_report_standard_packet(dev, packet);
381 psmouse->badbyte = psmouse->packet[0];
387 psmouse->packet[psmouse->pktcnt++] = data;
390 if (unlikely(psmouse->packet[0] == PSMOUSE_RET_BAT && psmouse->pktcnt <= 2)) {
396 if (psmouse->packet[1] == PSMOUSE_RET_ID ||
398 psmouse->packet[1] == PSMOUSE_RET_BAT)) {
409 psmouse->packet[psmouse->pktcnt++] = data;
419 psmouse->badbyte = psmouse->packet[0];
497 return ps2_command(&psmouse->ps2dev, psmouse->packet,
1355 * transmitting motion packet. To avoid delay we use ps2_sendbyte()
1372 * Poll the mouse. If it was reset the packet will be shorter than
1549 * If mouse's packet size is 3 there is no point in polling the