Lines Matching refs:resp_data

361 	pip->resp_data = NULL;  in cyapa_pip_cmd_state_initialize()
568 u8 *resp_data, int *resp_len, in cyapa_do_i2c_pip_cmd_polling() argument
585 if (resp_data && resp_len && length != 0 && func) { in cyapa_do_i2c_pip_cmd_polling()
591 resp_data, resp_len, func); in cyapa_do_i2c_pip_cmd_polling()
608 u8 *resp_data, int *resp_len, in cyapa_i2c_pip_cmd_irq_sync() argument
625 pip->resp_data = resp_data; in cyapa_i2c_pip_cmd_irq_sync()
643 if (error == -ETIMEDOUT && resp_data && in cyapa_i2c_pip_cmd_irq_sync()
651 resp_data, resp_len, func); in cyapa_i2c_pip_cmd_irq_sync()
658 resp_data, resp_len, timeout, func); in cyapa_i2c_pip_cmd_irq_sync()
662 pip->resp_data = NULL; in cyapa_i2c_pip_cmd_irq_sync()
770 u8 resp_data[PIP_HID_DESCRIPTOR_SIZE]; in gen5_idle_state_parse() local
783 memset(resp_data, 0, sizeof(resp_data)); in gen5_idle_state_parse()
784 ret = cyapa_i2c_pip_read(cyapa, resp_data, 3); in gen5_idle_state_parse()
788 length = get_unaligned_le16(&resp_data[PIP_RESP_LENGTH_OFFSET]); in gen5_idle_state_parse()
801 resp_data, &length, in gen5_idle_state_parse()
809 &resp_data[PIP_RESP_LENGTH_OFFSET]); in gen5_idle_state_parse()
810 max_output_len = get_unaligned_le16(&resp_data[16]); in gen5_idle_state_parse()
813 (resp_data[PIP_RESP_REPORT_ID_OFFSET] == in gen5_idle_state_parse()
820 (resp_data[PIP_RESP_REPORT_ID_OFFSET] == in gen5_idle_state_parse()
837 u8 resp_data[32]; in gen5_hid_description_header_parse() local
848 ret = cyapa_i2c_pip_read(cyapa, resp_data, in gen5_hid_description_header_parse()
852 length = get_unaligned_le16(&resp_data[PIP_RESP_LENGTH_OFFSET]); in gen5_hid_description_header_parse()
853 max_output_len = get_unaligned_le16(&resp_data[16]); in gen5_hid_description_header_parse()
872 resp_data[2] == PIP_HID_BL_REPORT_ID && in gen5_hid_description_header_parse()
878 (resp_data[PIP_RESP_REPORT_ID_OFFSET] == in gen5_hid_description_header_parse()
1057 u8 resp_data[11]; in cyapa_pip_bl_initiate() local
1103 resp_len = sizeof(resp_data); in cyapa_pip_bl_initiate()
1106 resp_data, &resp_len, 12000, in cyapa_pip_bl_initiate()
1109 resp_data[2] != PIP_BL_RESP_REPORT_ID || in cyapa_pip_bl_initiate()
1110 !PIP_CMD_COMPLETE_SUCCESS(resp_data)) in cyapa_pip_bl_initiate()
1143 u8 resp_data[11]; in cyapa_pip_bl_exit() local
1147 resp_len = sizeof(resp_data); in cyapa_pip_bl_exit()
1150 resp_data, &resp_len, in cyapa_pip_bl_exit()
1156 resp_data[PIP_RESP_REPORT_ID_OFFSET] == in cyapa_pip_bl_exit()
1160 if (resp_data[0] == 0x00 && resp_data[1] == 0x00) in cyapa_pip_bl_exit()
1169 u8 resp_data[2]; in cyapa_pip_bl_enter() local
1190 resp_len = sizeof(resp_data); in cyapa_pip_bl_enter()
1191 memset(resp_data, 0, resp_len); in cyapa_pip_bl_enter()
1194 resp_data, &resp_len, in cyapa_pip_bl_enter()
1197 if (error || resp_data[0] != 0x00 || resp_data[1] != 0x00) in cyapa_pip_bl_enter()
1329 u8 resp_data[11]; in cyapa_pip_write_fw_block() local
1369 resp_len = sizeof(resp_data); in cyapa_pip_write_fw_block()
1371 resp_data, &resp_len, in cyapa_pip_write_fw_block()
1374 resp_data[2] != PIP_BL_RESP_REPORT_ID || in cyapa_pip_write_fw_block()
1375 !PIP_CMD_COMPLETE_SUCCESS(resp_data)) in cyapa_pip_write_fw_block()
1414 u8 resp_data[6]; in cyapa_gen5_change_power_state() local
1419 resp_len = sizeof(resp_data); in cyapa_gen5_change_power_state()
1421 resp_data, &resp_len, in cyapa_gen5_change_power_state()
1423 if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x08) || in cyapa_gen5_change_power_state()
1424 !PIP_CMD_COMPLETE_SUCCESS(resp_data)) in cyapa_gen5_change_power_state()
1437 u8 resp_data[7]; in cyapa_gen5_set_interval_time() local
1475 resp_len = sizeof(resp_data); in cyapa_gen5_set_interval_time()
1477 resp_data, &resp_len, in cyapa_gen5_set_interval_time()
1479 if (error || resp_data[5] != parameter_id || in cyapa_gen5_set_interval_time()
1480 resp_data[6] != parameter_size || in cyapa_gen5_set_interval_time()
1481 !VALID_CMD_RESP_HEADER(resp_data, GEN5_CMD_SET_PARAMETER)) in cyapa_gen5_set_interval_time()
1494 u8 resp_data[11]; in cyapa_gen5_get_interval_time() local
1529 resp_len = sizeof(resp_data); in cyapa_gen5_get_interval_time()
1531 resp_data, &resp_len, in cyapa_gen5_get_interval_time()
1533 if (error || resp_data[5] != parameter_id || resp_data[6] == 0 || in cyapa_gen5_get_interval_time()
1534 !VALID_CMD_RESP_HEADER(resp_data, GEN5_CMD_GET_PARAMETER)) in cyapa_gen5_get_interval_time()
1540 *interval_time = get_unaligned_le16(&resp_data[7]) & mask; in cyapa_gen5_get_interval_time()
1549 u8 resp_data[7]; in cyapa_gen5_disable_pip_report() local
1563 resp_len = sizeof(resp_data); in cyapa_gen5_disable_pip_report()
1565 resp_data, &resp_len, in cyapa_gen5_disable_pip_report()
1567 if (error || resp_data[5] != GEN5_PARAMETER_DISABLE_PIP_REPORT || in cyapa_gen5_disable_pip_report()
1568 !VALID_CMD_RESP_HEADER(resp_data, GEN5_CMD_SET_PARAMETER) || in cyapa_gen5_disable_pip_report()
1569 resp_data[6] != 0x01) in cyapa_gen5_disable_pip_report()
1580 u8 resp_data[6]; in cyapa_pip_set_proximity() local
1584 resp_len = sizeof(resp_data); in cyapa_pip_set_proximity()
1586 resp_data, &resp_len, in cyapa_pip_set_proximity()
1588 if (error || !VALID_CMD_RESP_HEADER(resp_data, PIP_SET_PROXIMITY) || in cyapa_pip_set_proximity()
1589 !PIP_CMD_COMPLETE_SUCCESS(resp_data)) { in cyapa_pip_set_proximity()
1600 u8 resp_data[5]; in cyapa_pip_deep_sleep() local
1605 resp_len = sizeof(resp_data); in cyapa_pip_deep_sleep()
1607 resp_data, &resp_len, in cyapa_pip_deep_sleep()
1609 if (error || ((resp_data[3] & PIP_DEEP_SLEEP_STATE_MASK) != state)) in cyapa_pip_deep_sleep()
1744 u8 resp_data[6]; in cyapa_pip_resume_scanning() local
1751 resp_len = sizeof(resp_data); in cyapa_pip_resume_scanning()
1754 resp_data, &resp_len, in cyapa_pip_resume_scanning()
1756 if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x04)) in cyapa_pip_resume_scanning()
1768 u8 resp_data[6]; in cyapa_pip_suspend_scanning() local
1775 resp_len = sizeof(resp_data); in cyapa_pip_suspend_scanning()
1778 resp_data, &resp_len, in cyapa_pip_suspend_scanning()
1780 if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x03)) in cyapa_pip_suspend_scanning()
1794 u8 resp_data[6]; in cyapa_pip_calibrate_pwcs() local
1808 resp_len = sizeof(resp_data); in cyapa_pip_calibrate_pwcs()
1811 resp_data, &resp_len, in cyapa_pip_calibrate_pwcs()
1813 if (error || !VALID_CMD_RESP_HEADER(resp_data, PIP_CMD_CALIBRATE) || in cyapa_pip_calibrate_pwcs()
1814 !PIP_CMD_COMPLETE_SUCCESS(resp_data)) in cyapa_pip_calibrate_pwcs()
1939 u8 resp_data[256]; in cyapa_gen5_read_idac_data() local
2025 resp_data, &resp_len, in cyapa_gen5_read_idac_data()
2029 !VALID_CMD_RESP_HEADER(resp_data, cmd_code) || in cyapa_gen5_read_idac_data()
2030 !PIP_CMD_COMPLETE_SUCCESS(resp_data) || in cyapa_gen5_read_idac_data()
2031 resp_data[6] != idac_data_type) in cyapa_gen5_read_idac_data()
2033 read_len = get_unaligned_le16(&resp_data[7]); in cyapa_gen5_read_idac_data()
2037 *data_size = (resp_data[9] & GEN5_PWC_DATA_ELEMENT_SIZE_MASK); in cyapa_gen5_read_idac_data()
2045 resp_data[9], in cyapa_gen5_read_idac_data()
2046 &resp_data[GEN5_RESP_DATA_STRUCTURE_OFFSET], in cyapa_gen5_read_idac_data()
2050 resp_data[9], in cyapa_gen5_read_idac_data()
2051 &resp_data[GEN5_RESP_DATA_STRUCTURE_OFFSET + in cyapa_gen5_read_idac_data()
2061 value = cyapa_parse_structure_data(resp_data[9], in cyapa_gen5_read_idac_data()
2062 &resp_data[i], *data_size); in cyapa_gen5_read_idac_data()
2182 u8 resp_data[6]; in cyapa_gen5_execute_panel_scan() local
2192 resp_len = sizeof(resp_data); in cyapa_gen5_execute_panel_scan()
2195 resp_data, &resp_len, in cyapa_gen5_execute_panel_scan()
2197 if (error || resp_len != sizeof(resp_data) || in cyapa_gen5_execute_panel_scan()
2198 !VALID_CMD_RESP_HEADER(resp_data, in cyapa_gen5_execute_panel_scan()
2200 !PIP_CMD_COMPLETE_SUCCESS(resp_data)) in cyapa_gen5_execute_panel_scan()
2214 u8 resp_data[256]; /* Max bytes can transfer one time. */ in cyapa_gen5_read_panel_scan_raw_data() local
2255 resp_data, &resp_len, in cyapa_gen5_read_panel_scan_raw_data()
2258 !VALID_CMD_RESP_HEADER(resp_data, cmd_code) || in cyapa_gen5_read_panel_scan_raw_data()
2259 !PIP_CMD_COMPLETE_SUCCESS(resp_data) || in cyapa_gen5_read_panel_scan_raw_data()
2260 resp_data[6] != raw_data_type) in cyapa_gen5_read_panel_scan_raw_data()
2263 read_elements = get_unaligned_le16(&resp_data[7]); in cyapa_gen5_read_panel_scan_raw_data()
2267 data_size = (resp_data[9] & GEN5_PWC_DATA_ELEMENT_SIZE_MASK); in cyapa_gen5_read_panel_scan_raw_data()
2274 value = cyapa_parse_structure_data(resp_data[9], in cyapa_gen5_read_panel_scan_raw_data()
2275 &resp_data[i], data_size); in cyapa_gen5_read_panel_scan_raw_data()
2291 read_elements = (sizeof(resp_data) - in cyapa_gen5_read_panel_scan_raw_data()
2449 u8 resp_data[PIP_BL_APP_INFO_RESP_LENGTH]; in cyapa_gen5_bl_query_data() local
2453 resp_len = sizeof(resp_data); in cyapa_gen5_bl_query_data()
2456 resp_data, &resp_len, in cyapa_gen5_bl_query_data()
2459 !PIP_CMD_COMPLETE_SUCCESS(resp_data)) in cyapa_gen5_bl_query_data()
2462 memcpy(&cyapa->product_id[0], &resp_data[8], 5); in cyapa_gen5_bl_query_data()
2464 memcpy(&cyapa->product_id[6], &resp_data[13], 6); in cyapa_gen5_bl_query_data()
2466 memcpy(&cyapa->product_id[13], &resp_data[19], 2); in cyapa_gen5_bl_query_data()
2469 cyapa->fw_maj_ver = resp_data[22]; in cyapa_gen5_bl_query_data()
2470 cyapa->fw_min_ver = resp_data[23]; in cyapa_gen5_bl_query_data()
2472 cyapa->platform_ver = (resp_data[26] >> PIP_BL_PLATFORM_VER_SHIFT) & in cyapa_gen5_bl_query_data()
2480 u8 resp_data[PIP_READ_SYS_INFO_RESP_LENGTH]; in cyapa_gen5_get_query_data() local
2485 resp_len = sizeof(resp_data); in cyapa_gen5_get_query_data()
2488 resp_data, &resp_len, in cyapa_gen5_get_query_data()
2490 if (error || resp_len < sizeof(resp_data)) in cyapa_gen5_get_query_data()
2493 product_family = get_unaligned_le16(&resp_data[7]); in cyapa_gen5_get_query_data()
2498 cyapa->platform_ver = (resp_data[49] >> PIP_BL_PLATFORM_VER_SHIFT) & in cyapa_gen5_get_query_data()
2502 cyapa->fw_maj_ver = resp_data[15]; in cyapa_gen5_get_query_data()
2503 cyapa->fw_min_ver = resp_data[16]; in cyapa_gen5_get_query_data()
2505 cyapa->fw_maj_ver = resp_data[9]; in cyapa_gen5_get_query_data()
2506 cyapa->fw_min_ver = resp_data[10]; in cyapa_gen5_get_query_data()
2509 cyapa->electrodes_x = resp_data[52]; in cyapa_gen5_get_query_data()
2510 cyapa->electrodes_y = resp_data[53]; in cyapa_gen5_get_query_data()
2512 cyapa->physical_size_x = get_unaligned_le16(&resp_data[54]) / 100; in cyapa_gen5_get_query_data()
2513 cyapa->physical_size_y = get_unaligned_le16(&resp_data[56]) / 100; in cyapa_gen5_get_query_data()
2515 cyapa->max_abs_x = get_unaligned_le16(&resp_data[58]); in cyapa_gen5_get_query_data()
2516 cyapa->max_abs_y = get_unaligned_le16(&resp_data[60]); in cyapa_gen5_get_query_data()
2518 cyapa->max_z = get_unaligned_le16(&resp_data[62]); in cyapa_gen5_get_query_data()
2520 cyapa->x_origin = resp_data[64] & 0x01; in cyapa_gen5_get_query_data()
2521 cyapa->y_origin = resp_data[65] & 0x01; in cyapa_gen5_get_query_data()
2523 cyapa->btn_capability = (resp_data[70] << 3) & CAPABILITY_BTN_MASK; in cyapa_gen5_get_query_data()
2525 memcpy(&cyapa->product_id[0], &resp_data[33], 5); in cyapa_gen5_get_query_data()
2527 memcpy(&cyapa->product_id[6], &resp_data[38], 6); in cyapa_gen5_get_query_data()
2529 memcpy(&cyapa->product_id[13], &resp_data[44], 2); in cyapa_gen5_get_query_data()
2649 pip->resp_data, in cyapa_pip_irq_cmd_handler()
2660 if (pip->resp_data && pip->resp_len) { in cyapa_pip_irq_cmd_handler()
2663 memcpy(pip->resp_data, pip->irq_cmd_buf, in cyapa_pip_irq_cmd_handler()