Lines Matching defs:packet

133 void psmouse_report_standard_motion(struct input_dev *dev, u8 *packet)
137 x = packet[1] ? packet[1] - ((packet[0] << 4) & 0x100) : 0;
138 y = packet[2] ? packet[2] - ((packet[0] << 3) & 0x100) : 0;
144 void psmouse_report_standard_packet(struct input_dev *dev, u8 *packet)
146 psmouse_report_standard_buttons(dev, packet[0]);
147 psmouse_report_standard_motion(dev, packet);
152 * relevant events to the input module once full packet has arrived.
157 u8 *packet = psmouse->packet;
163 /* Full packet accumulated, process it */
168 input_report_rel(dev, REL_WHEEL, -(s8) packet[3]);
173 switch (packet[3] & 0xC0) {
176 -sign_extend32(packet[3], 5));
180 -sign_extend32(packet[3], 5));
184 wheel = sign_extend32(packet[3], 3);
196 input_report_key(dev, BTN_SIDE, packet[3] & BIT(4));
197 input_report_key(dev, BTN_EXTRA, packet[3] & BIT(5));
204 input_report_rel(dev, REL_WHEEL, -(s8) packet[3]);
207 input_report_key(dev, BTN_SIDE, packet[0] & BIT(6));
208 input_report_key(dev, BTN_EXTRA, packet[0] & BIT(7));
213 input_report_key(dev, BTN_EXTRA, packet[0] & BIT(3));
219 packet[1] |= (packet[0] & 0x40) << 1;
227 input_report_key(dev, BTN_SIDE, packet[0] & BIT(3));
228 packet[0] |= BIT(3);
236 packet[0] |= psmouse->extra_buttons;
237 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];
494 return ps2_command(&psmouse->ps2dev, psmouse->packet,
1352 * transmitting motion packet. To avoid delay we use ps2_sendbyte()
1369 * Poll the mouse. If it was reset the packet will be shorter than
1544 * If mouse's packet size is 3 there is no point in polling the