Lines Matching refs:resp_data
91 u8 resp_data[PIP_READ_SYS_INFO_RESP_LENGTH]; in cyapa_get_pip_fixed_info() local
98 resp_len = sizeof(resp_data); in cyapa_get_pip_fixed_info()
101 resp_data, &resp_len, in cyapa_get_pip_fixed_info()
107 pip_info->family_id = resp_data[8]; in cyapa_get_pip_fixed_info()
108 pip_info->silicon_id_low = resp_data[10]; in cyapa_get_pip_fixed_info()
109 pip_info->silicon_id_high = resp_data[11]; in cyapa_get_pip_fixed_info()
115 resp_len = sizeof(resp_data); in cyapa_get_pip_fixed_info()
118 resp_data, &resp_len, in cyapa_get_pip_fixed_info()
123 product_family = get_unaligned_le16(&resp_data[7]); in cyapa_get_pip_fixed_info()
128 pip_info->family_id = resp_data[19]; in cyapa_get_pip_fixed_info()
129 pip_info->silicon_id_low = resp_data[21]; in cyapa_get_pip_fixed_info()
130 pip_info->silicon_id_high = resp_data[22]; in cyapa_get_pip_fixed_info()
140 u8 resp_data[PIP_HID_DESCRIPTOR_SIZE]; in cyapa_pip_state_parse() local
160 resp_data, &resp_len, in cyapa_pip_state_parse()
167 if (resp_data[PIP_RESP_REPORT_ID_OFFSET] == PIP_HID_BL_REPORT_ID) in cyapa_pip_state_parse()
169 else if (resp_data[PIP_RESP_REPORT_ID_OFFSET] == PIP_HID_APP_REPORT_ID) in cyapa_pip_state_parse()
196 u8 resp_data[PIP_READ_SYS_INFO_RESP_LENGTH]; in cyapa_gen6_read_sys_info() local
203 resp_len = sizeof(resp_data); in cyapa_gen6_read_sys_info()
206 resp_data, &resp_len, in cyapa_gen6_read_sys_info()
208 if (error || resp_len < sizeof(resp_data)) in cyapa_gen6_read_sys_info()
211 product_family = get_unaligned_le16(&resp_data[7]); in cyapa_gen6_read_sys_info()
216 cyapa->platform_ver = (resp_data[67] >> PIP_BL_PLATFORM_VER_SHIFT) & in cyapa_gen6_read_sys_info()
218 cyapa->fw_maj_ver = resp_data[9]; in cyapa_gen6_read_sys_info()
219 cyapa->fw_min_ver = resp_data[10]; in cyapa_gen6_read_sys_info()
221 cyapa->electrodes_x = resp_data[33]; in cyapa_gen6_read_sys_info()
222 cyapa->electrodes_y = resp_data[34]; in cyapa_gen6_read_sys_info()
224 cyapa->physical_size_x = get_unaligned_le16(&resp_data[35]) / 100; in cyapa_gen6_read_sys_info()
225 cyapa->physical_size_y = get_unaligned_le16(&resp_data[37]) / 100; in cyapa_gen6_read_sys_info()
227 cyapa->max_abs_x = get_unaligned_le16(&resp_data[39]); in cyapa_gen6_read_sys_info()
228 cyapa->max_abs_y = get_unaligned_le16(&resp_data[41]); in cyapa_gen6_read_sys_info()
230 cyapa->max_z = get_unaligned_le16(&resp_data[43]); in cyapa_gen6_read_sys_info()
232 cyapa->x_origin = resp_data[45] & 0x01; in cyapa_gen6_read_sys_info()
233 cyapa->y_origin = resp_data[46] & 0x01; in cyapa_gen6_read_sys_info()
235 cyapa->btn_capability = (resp_data[70] << 3) & CAPABILITY_BTN_MASK; in cyapa_gen6_read_sys_info()
237 memcpy(&cyapa->product_id[0], &resp_data[51], 5); in cyapa_gen6_read_sys_info()
239 memcpy(&cyapa->product_id[6], &resp_data[56], 6); in cyapa_gen6_read_sys_info()
241 memcpy(&cyapa->product_id[13], &resp_data[62], 2); in cyapa_gen6_read_sys_info()
245 rotat_align = resp_data[68]; in cyapa_gen6_read_sys_info()
260 u8 resp_data[PIP_BL_APP_INFO_RESP_LENGTH]; in cyapa_gen6_bl_read_app_info() local
264 resp_len = sizeof(resp_data); in cyapa_gen6_bl_read_app_info()
267 resp_data, &resp_len, in cyapa_gen6_bl_read_app_info()
270 !PIP_CMD_COMPLETE_SUCCESS(resp_data)) in cyapa_gen6_bl_read_app_info()
273 cyapa->fw_maj_ver = resp_data[8]; in cyapa_gen6_bl_read_app_info()
274 cyapa->fw_min_ver = resp_data[9]; in cyapa_gen6_bl_read_app_info()
276 cyapa->platform_ver = (resp_data[12] >> PIP_BL_PLATFORM_VER_SHIFT) & in cyapa_gen6_bl_read_app_info()
279 memcpy(&cyapa->product_id[0], &resp_data[13], 5); in cyapa_gen6_bl_read_app_info()
281 memcpy(&cyapa->product_id[6], &resp_data[18], 6); in cyapa_gen6_bl_read_app_info()
283 memcpy(&cyapa->product_id[13], &resp_data[24], 2); in cyapa_gen6_bl_read_app_info()
293 u8 resp_data[6]; in cyapa_gen6_config_dev_irq() local
297 resp_len = sizeof(resp_data); in cyapa_gen6_config_dev_irq()
299 resp_data, &resp_len, in cyapa_gen6_config_dev_irq()
301 if (error || !VALID_CMD_RESP_HEADER(resp_data, cmd_code) || in cyapa_gen6_config_dev_irq()
302 !PIP_CMD_COMPLETE_SUCCESS(resp_data) in cyapa_gen6_config_dev_irq()
323 u8 resp_data[6]; in cyapa_gen6_change_power_state() local
327 resp_len = sizeof(resp_data); in cyapa_gen6_change_power_state()
329 resp_data, &resp_len, in cyapa_gen6_change_power_state()
331 if (error || !VALID_CMD_RESP_HEADER(resp_data, 0x46)) in cyapa_gen6_change_power_state()
335 if (resp_data[5] != power_mode) in cyapa_gen6_change_power_state()
354 u8 resp_data[11]; in cyapa_gen6_set_interval_setting() local
371 resp_len = sizeof(resp_data); in cyapa_gen6_set_interval_setting()
374 resp_data, &resp_len, in cyapa_gen6_set_interval_setting()
377 !VALID_CMD_RESP_HEADER(resp_data, GEN6_SET_POWER_MODE_INTERVAL)) in cyapa_gen6_set_interval_setting()
381 interval_setting->active_interval = get_unaligned_le16(&resp_data[5]); in cyapa_gen6_set_interval_setting()
382 interval_setting->lp1_interval = get_unaligned_le16(&resp_data[7]); in cyapa_gen6_set_interval_setting()
383 interval_setting->lp2_interval = get_unaligned_le16(&resp_data[9]); in cyapa_gen6_set_interval_setting()
393 u8 resp_data[11]; in cyapa_gen6_get_interval_setting() local
397 resp_len = sizeof(resp_data); in cyapa_gen6_get_interval_setting()
399 resp_data, &resp_len, in cyapa_gen6_get_interval_setting()
402 !VALID_CMD_RESP_HEADER(resp_data, GEN6_GET_POWER_MODE_INTERVAL)) in cyapa_gen6_get_interval_setting()
405 interval_setting->active_interval = get_unaligned_le16(&resp_data[5]); in cyapa_gen6_get_interval_setting()
406 interval_setting->lp1_interval = get_unaligned_le16(&resp_data[7]); in cyapa_gen6_get_interval_setting()
407 interval_setting->lp2_interval = get_unaligned_le16(&resp_data[9]); in cyapa_gen6_get_interval_setting()
570 u8 resp_data[GEN6_MAX_RX_NUM + 10]; in cyapa_pip_retrieve_data_structure() local
583 resp_len = sizeof(resp_data); in cyapa_pip_retrieve_data_structure()
586 resp_data, &resp_len, in cyapa_pip_retrieve_data_structure()
589 if (error || !PIP_CMD_COMPLETE_SUCCESS(resp_data) || in cyapa_pip_retrieve_data_structure()
590 resp_data[6] != data_id || in cyapa_pip_retrieve_data_structure()
591 !VALID_CMD_RESP_HEADER(resp_data, PIP_RETRIEVE_DATA_STRUCTURE)) in cyapa_pip_retrieve_data_structure()
594 read_len = get_unaligned_le16(&resp_data[7]); in cyapa_pip_retrieve_data_structure()
600 memcpy(data, &resp_data[10], read_len); in cyapa_pip_retrieve_data_structure()