Lines Matching defs:packet
430 static void mip4_report_keys(struct mip4_ts *ts, u8 *packet)
438 key = packet[0] & 0x0F;
439 down = packet[0] & 0x80;
444 key = packet[0] & 0x0F;
445 down = packet[1] & 0x01;
465 static void mip4_report_touch(struct mip4_ts *ts, u8 *packet)
482 state = packet[0] & BIT(7);
483 hover = packet[0] & BIT(5);
484 palm = packet[0] & BIT(4);
485 id = (packet[0] & 0x0F) - 1;
486 x = ((packet[1] & 0x0F) << 8) | packet[2];
487 y = (((packet[1] >> 4) & 0x0F) << 8) |
488 packet[3];
489 pressure = packet[4];
490 size = packet[5];
492 touch_major = packet[5];
493 touch_minor = packet[5];
495 touch_major = packet[6];
496 touch_minor = packet[7];
503 id = (packet[0] & 0x0F) - 1;
504 hover = packet[1] & BIT(2);
505 palm = packet[1] & BIT(1);
506 state = packet[1] & BIT(0);
507 x = ((packet[2] & 0x0F) << 8) | packet[3];
508 y = (((packet[2] >> 4) & 0x0F) << 8) |
509 packet[4];
510 size = packet[6];
511 pressure_stage = (packet[7] & 0xF0) >> 4;
512 pressure = ((packet[7] & 0x0F) << 8) |
513 packet[8];
514 touch_major = packet[9];
515 touch_minor = packet[10];
543 static int mip4_handle_packet(struct mip4_ts *ts, u8 *packet)
550 type = (packet[0] & 0x40) >> 6;
554 type = (packet[0] & 0xF0) >> 4;
567 mip4_report_keys(ts, packet);
571 mip4_report_touch(ts, packet);
592 /* Read packet info */
598 "Failed to read packet info: %d\n", error);
604 dev_dbg(&client->dev, "packet size: %d, alert: %d\n", size, alert);
608 dev_err(&client->dev, "Empty packet\n");
612 /* Read packet data */
618 "Failed to read packet data: %d\n", error);
1105 "Program & Verify, page size: %d, packet size: %d\n",