Lines Matching refs:resp_data
361 pip->resp_data = NULL;
567 u8 *resp_data, int *resp_len,
584 if (resp_data && resp_len && length != 0 && func) {
590 resp_data, resp_len, func);
607 u8 *resp_data, int *resp_len,
624 pip->resp_data = resp_data;
642 if (error == -ETIMEDOUT && resp_data &&
650 resp_data, resp_len, func);
657 resp_data, resp_len, timeout, func);
661 pip->resp_data = NULL;
769 u8 resp_data[PIP_HID_DESCRIPTOR_SIZE];
782 memset(resp_data, 0, sizeof(resp_data));
783 ret = cyapa_i2c_pip_read(cyapa, resp_data, 3);
787 length = get_unaligned_le16(&resp_data[PIP_RESP_LENGTH_OFFSET]);
800 resp_data, &length,
808 &resp_data[PIP_RESP_LENGTH_OFFSET]);
809 max_output_len = get_unaligned_le16(&resp_data[16]);
812 (resp_data[PIP_RESP_REPORT_ID_OFFSET] ==
819 (resp_data[PIP_RESP_REPORT_ID_OFFSET] ==
836 u8 resp_data[32];
847 ret = cyapa_i2c_pip_read(cyapa, resp_data,
851 length = get_unaligned_le16(&resp_data[PIP_RESP_LENGTH_OFFSET]);
852 max_output_len = get_unaligned_le16(&resp_data[16]);
871 resp_data[2] == PIP_HID_BL_REPORT_ID &&
877 (resp_data[PIP_RESP_REPORT_ID_OFFSET] ==
1056 u8 resp_data[11];
1102 resp_len = sizeof(resp_data);
1105 resp_data, &resp_len, 12000,
1108 resp_data[2] != PIP_BL_RESP_REPORT_ID ||
1109 !PIP_CMD_COMPLETE_SUCCESS(resp_data))
1142 u8 resp_data[11];
1146 resp_len = sizeof(resp_data);
1149 resp_data, &resp_len,
1155 resp_data[PIP_RESP_REPORT_ID_OFFSET] ==
1159 if (resp_data[0] == 0x00 && resp_data[1] == 0x00)
1168 u8 resp_data[2];
1189 resp_len = sizeof(resp_data);
1190 memset(resp_data, 0, resp_len);
1193 resp_data, &resp_len,
1196 if (error || resp_data[0] != 0x00 || resp_data[1] != 0x00)
1328 u8 resp_data[11];
1368 resp_len = sizeof(resp_data);
1370 resp_data, &resp_len,
1373 resp_data[2] != PIP_BL_RESP_REPORT_ID ||
1374 !PIP_CMD_COMPLETE_SUCCESS(resp_data))
1413 u8 resp_data[6];
1418 resp_len = sizeof(resp_data);
1420 resp_data, &resp_len,
1422 if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x08) ||
1423 !PIP_CMD_COMPLETE_SUCCESS(resp_data))
1436 u8 resp_data[7];
1474 resp_len = sizeof(resp_data);
1476 resp_data, &resp_len,
1478 if (error || resp_data[5] != parameter_id ||
1479 resp_data[6] != parameter_size ||
1480 !VALID_CMD_RESP_HEADER(resp_data, GEN5_CMD_SET_PARAMETER))
1493 u8 resp_data[11];
1528 resp_len = sizeof(resp_data);
1530 resp_data, &resp_len,
1532 if (error || resp_data[5] != parameter_id || resp_data[6] == 0 ||
1533 !VALID_CMD_RESP_HEADER(resp_data, GEN5_CMD_GET_PARAMETER))
1539 *interval_time = get_unaligned_le16(&resp_data[7]) & mask;
1548 u8 resp_data[7];
1562 resp_len = sizeof(resp_data);
1564 resp_data, &resp_len,
1566 if (error || resp_data[5] != GEN5_PARAMETER_DISABLE_PIP_REPORT ||
1567 !VALID_CMD_RESP_HEADER(resp_data, GEN5_CMD_SET_PARAMETER) ||
1568 resp_data[6] != 0x01)
1579 u8 resp_data[6];
1583 resp_len = sizeof(resp_data);
1585 resp_data, &resp_len,
1587 if (error || !VALID_CMD_RESP_HEADER(resp_data, PIP_SET_PROXIMITY) ||
1588 !PIP_CMD_COMPLETE_SUCCESS(resp_data)) {
1599 u8 resp_data[5];
1604 resp_len = sizeof(resp_data);
1606 resp_data, &resp_len,
1608 if (error || ((resp_data[3] & PIP_DEEP_SLEEP_STATE_MASK) != state))
1743 u8 resp_data[6];
1750 resp_len = sizeof(resp_data);
1753 resp_data, &resp_len,
1755 if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x04))
1767 u8 resp_data[6];
1774 resp_len = sizeof(resp_data);
1777 resp_data, &resp_len,
1779 if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x03))
1793 u8 resp_data[6];
1807 resp_len = sizeof(resp_data);
1810 resp_data, &resp_len,
1812 if (error || !VALID_CMD_RESP_HEADER(resp_data, PIP_CMD_CALIBRATE) ||
1813 !PIP_CMD_COMPLETE_SUCCESS(resp_data))
1938 u8 resp_data[256];
2024 resp_data, &resp_len,
2028 !VALID_CMD_RESP_HEADER(resp_data, cmd_code) ||
2029 !PIP_CMD_COMPLETE_SUCCESS(resp_data) ||
2030 resp_data[6] != idac_data_type)
2032 read_len = get_unaligned_le16(&resp_data[7]);
2036 *data_size = (resp_data[9] & GEN5_PWC_DATA_ELEMENT_SIZE_MASK);
2044 resp_data[9],
2045 &resp_data[GEN5_RESP_DATA_STRUCTURE_OFFSET],
2049 resp_data[9],
2050 &resp_data[GEN5_RESP_DATA_STRUCTURE_OFFSET +
2060 value = cyapa_parse_structure_data(resp_data[9],
2061 &resp_data[i], *data_size);
2181 u8 resp_data[6];
2191 resp_len = sizeof(resp_data);
2194 resp_data, &resp_len,
2196 if (error || resp_len != sizeof(resp_data) ||
2197 !VALID_CMD_RESP_HEADER(resp_data,
2199 !PIP_CMD_COMPLETE_SUCCESS(resp_data))
2213 u8 resp_data[256]; /* Max bytes can transfer one time. */
2254 resp_data, &resp_len,
2257 !VALID_CMD_RESP_HEADER(resp_data, cmd_code) ||
2258 !PIP_CMD_COMPLETE_SUCCESS(resp_data) ||
2259 resp_data[6] != raw_data_type)
2262 read_elements = get_unaligned_le16(&resp_data[7]);
2266 data_size = (resp_data[9] & GEN5_PWC_DATA_ELEMENT_SIZE_MASK);
2273 value = cyapa_parse_structure_data(resp_data[9],
2274 &resp_data[i], data_size);
2290 read_elements = (sizeof(resp_data) -
2448 u8 resp_data[PIP_BL_APP_INFO_RESP_LENGTH];
2452 resp_len = sizeof(resp_data);
2455 resp_data, &resp_len,
2458 !PIP_CMD_COMPLETE_SUCCESS(resp_data))
2461 memcpy(&cyapa->product_id[0], &resp_data[8], 5);
2463 memcpy(&cyapa->product_id[6], &resp_data[13], 6);
2465 memcpy(&cyapa->product_id[13], &resp_data[19], 2);
2468 cyapa->fw_maj_ver = resp_data[22];
2469 cyapa->fw_min_ver = resp_data[23];
2471 cyapa->platform_ver = (resp_data[26] >> PIP_BL_PLATFORM_VER_SHIFT) &
2479 u8 resp_data[PIP_READ_SYS_INFO_RESP_LENGTH];
2484 resp_len = sizeof(resp_data);
2487 resp_data, &resp_len,
2489 if (error || resp_len < sizeof(resp_data))
2492 product_family = get_unaligned_le16(&resp_data[7]);
2497 cyapa->platform_ver = (resp_data[49] >> PIP_BL_PLATFORM_VER_SHIFT) &
2501 cyapa->fw_maj_ver = resp_data[15];
2502 cyapa->fw_min_ver = resp_data[16];
2504 cyapa->fw_maj_ver = resp_data[9];
2505 cyapa->fw_min_ver = resp_data[10];
2508 cyapa->electrodes_x = resp_data[52];
2509 cyapa->electrodes_y = resp_data[53];
2511 cyapa->physical_size_x = get_unaligned_le16(&resp_data[54]) / 100;
2512 cyapa->physical_size_y = get_unaligned_le16(&resp_data[56]) / 100;
2514 cyapa->max_abs_x = get_unaligned_le16(&resp_data[58]);
2515 cyapa->max_abs_y = get_unaligned_le16(&resp_data[60]);
2517 cyapa->max_z = get_unaligned_le16(&resp_data[62]);
2519 cyapa->x_origin = resp_data[64] & 0x01;
2520 cyapa->y_origin = resp_data[65] & 0x01;
2522 cyapa->btn_capability = (resp_data[70] << 3) & CAPABILITY_BTN_MASK;
2524 memcpy(&cyapa->product_id[0], &resp_data[33], 5);
2526 memcpy(&cyapa->product_id[6], &resp_data[38], 6);
2528 memcpy(&cyapa->product_id[13], &resp_data[44], 2);
2648 pip->resp_data,
2659 if (pip->resp_data && pip->resp_len) {
2662 memcpy(pip->resp_data, pip->irq_cmd_buf,