Lines Matching refs:length

270 	__le16 length;  member
309 __le16 length; member
408 int length; in cyapa_empty_pip_output_data() local
444 length = get_unaligned_le16(pip->empty_buf); in cyapa_empty_pip_output_data()
445 if (length == PIP_RESP_LENGTH_SIZE) { in cyapa_empty_pip_output_data()
448 } else if (length > CYAPA_REG_MAP_SIZE) { in cyapa_empty_pip_output_data()
451 } else if (length == 0) { in cyapa_empty_pip_output_data()
453 length = PIP_RESP_LENGTH_SIZE; in cyapa_empty_pip_output_data()
455 func(cyapa, pip->empty_buf, length)) { in cyapa_empty_pip_output_data()
456 length = min(buf_len, length); in cyapa_empty_pip_output_data()
457 memcpy(buf, pip->empty_buf, length); in cyapa_empty_pip_output_data()
458 *len = length; in cyapa_empty_pip_output_data()
465 error = cyapa_i2c_pip_read(cyapa, pip->empty_buf, length); in cyapa_empty_pip_output_data()
471 length = get_unaligned_le16(pip->empty_buf); in cyapa_empty_pip_output_data()
472 if (length <= PIP_RESP_LENGTH_SIZE) { in cyapa_empty_pip_output_data()
475 func(cyapa, pip->empty_buf, length)) { in cyapa_empty_pip_output_data()
476 length = min(buf_len, length); in cyapa_empty_pip_output_data()
477 memcpy(buf, pip->empty_buf, length); in cyapa_empty_pip_output_data()
478 *len = length; in cyapa_empty_pip_output_data()
527 int length; in cyapa_do_i2c_pip_cmd_polling() local
537 length = resp_len ? *resp_len : 0; in cyapa_do_i2c_pip_cmd_polling()
538 if (resp_data && resp_len && length != 0 && func) { in cyapa_do_i2c_pip_cmd_polling()
542 *resp_len = length; in cyapa_do_i2c_pip_cmd_polling()
725 int length; in gen5_idle_state_parse() local
741 length = get_unaligned_le16(&resp_data[PIP_RESP_LENGTH_OFFSET]); in gen5_idle_state_parse()
742 if (length == PIP_RESP_LENGTH_SIZE) { in gen5_idle_state_parse()
751 length = PIP_HID_DESCRIPTOR_SIZE; in gen5_idle_state_parse()
754 resp_data, &length, in gen5_idle_state_parse()
761 length = get_unaligned_le16( in gen5_idle_state_parse()
764 if ((length == PIP_HID_DESCRIPTOR_SIZE || in gen5_idle_state_parse()
765 length == PIP_RESP_LENGTH_SIZE) && in gen5_idle_state_parse()
771 } else if ((length == PIP_HID_DESCRIPTOR_SIZE || in gen5_idle_state_parse()
772 length == PIP_RESP_LENGTH_SIZE) && in gen5_idle_state_parse()
789 int length; in gen5_hid_description_header_parse() local
805 length = get_unaligned_le16(&resp_data[PIP_RESP_LENGTH_OFFSET]); in gen5_hid_description_header_parse()
807 if (length == PIP_RESP_LENGTH_SIZE) { in gen5_hid_description_header_parse()
824 } else if (length == PIP_HID_DESCRIPTOR_SIZE && in gen5_hid_description_header_parse()
830 } else if (length == PIP_HID_DESCRIPTOR_SIZE && in gen5_hid_description_header_parse()
847 int length; in gen5_report_data_header_parse() local
849 length = get_unaligned_le16(&reg_data[PIP_RESP_LENGTH_OFFSET]); in gen5_report_data_header_parse()
852 if (length < PIP_TOUCH_REPORT_HEAD_SIZE || in gen5_report_data_header_parse()
853 length > PIP_TOUCH_REPORT_MAX_SIZE) in gen5_report_data_header_parse()
859 if (length < PIP_BTN_REPORT_HEAD_SIZE || in gen5_report_data_header_parse()
860 length > PIP_BTN_REPORT_MAX_SIZE) in gen5_report_data_header_parse()
864 if (length != PIP_WAKEUP_EVENT_SIZE) in gen5_report_data_header_parse()
879 int length; in gen5_cmd_resp_header_parse() local
887 length = get_unaligned_le16(&reg_data[PIP_RESP_LENGTH_OFFSET]); in gen5_cmd_resp_header_parse()
888 ret = cyapa_i2c_pip_read(cyapa, pip->empty_buf, length); in gen5_cmd_resp_header_parse()
889 if (ret != length) in gen5_cmd_resp_header_parse()
892 if (length == PIP_RESP_LENGTH_SIZE) { in gen5_cmd_resp_header_parse()
910 (pip->empty_buf[length - 1] == in gen5_cmd_resp_header_parse()
932 int length; in cyapa_gen5_state_parse() local
940 length = get_unaligned_le16(&reg_data[PIP_RESP_LENGTH_OFFSET]); in cyapa_gen5_state_parse()
941 if (length == 0 || length == PIP_RESP_LENGTH_SIZE) { in cyapa_gen5_state_parse()
943 } else if (length == PIP_HID_DESCRIPTOR_SIZE && in cyapa_gen5_state_parse()
947 } else if ((length == GEN5_APP_REPORT_DESCRIPTOR_SIZE || in cyapa_gen5_state_parse()
948 length == GEN5_APP_CONTRACT_REPORT_DESCRIPTOR_SIZE) && in cyapa_gen5_state_parse()
953 } else if (length == GEN5_BL_REPORT_DESCRIPTOR_SIZE && in cyapa_gen5_state_parse()
1026 put_unaligned_le16(cmd_len - 2, &bl_cmd_head->length); in cyapa_pip_bl_initiate()
1301 put_unaligned_le16(cmd_len - 2, &bl_cmd_head->length); in cyapa_pip_write_fw_block()
1422 &app_cmd_head->length); in cyapa_gen5_set_interval_time()
1477 put_unaligned_le16(cmd_len - 2, &app_cmd_head->length); in cyapa_gen5_get_interval_time()
1510 put_unaligned_le16(sizeof(cmd) - 2, &app_cmd_head->length); in cyapa_gen5_disable_pip_report()
1753 put_unaligned_le16(sizeof(cmd) - 2, &app_cmd_head->length); in cyapa_pip_calibrate_pwcs()
1959 put_unaligned_le16(sizeof(cmd) - 2, &cmd_head->length); in cyapa_gen5_read_idac_data()
2138 put_unaligned_le16(sizeof(cmd) - 2, &app_cmd_head->length); in cyapa_gen5_execute_panel_scan()
2190 put_unaligned_le16(sizeof(cmd) - 2, &app_cmd_head->length); in cyapa_gen5_read_panel_scan_raw_data()
2557 int length; in cyapa_pip_irq_cmd_handler() local
2571 length = get_unaligned_le16(pip->irq_cmd_buf); in cyapa_pip_irq_cmd_handler()
2572 length = (length <= PIP_RESP_LENGTH_SIZE) ? in cyapa_pip_irq_cmd_handler()
2573 PIP_RESP_LENGTH_SIZE : length; in cyapa_pip_irq_cmd_handler()
2574 if (length > PIP_RESP_LENGTH_SIZE) in cyapa_pip_irq_cmd_handler()
2576 pip->irq_cmd_buf, length); in cyapa_pip_irq_cmd_handler()
2579 pip->irq_cmd_buf, length))) { in cyapa_pip_irq_cmd_handler()
2593 length = 0; in cyapa_pip_irq_cmd_handler()
2595 length = *pip->resp_len; in cyapa_pip_irq_cmd_handler()
2598 &length, in cyapa_pip_irq_cmd_handler()
2600 if (pip->resp_len && length != 0) { in cyapa_pip_irq_cmd_handler()
2601 *pip->resp_len = length; in cyapa_pip_irq_cmd_handler()
2609 *pip->resp_len = (*pip->resp_len < length) ? in cyapa_pip_irq_cmd_handler()
2610 *pip->resp_len : length; in cyapa_pip_irq_cmd_handler()