Lines Matching refs:length
305 __le16 length; member
344 __le16 length; member
448 int length; in cyapa_empty_pip_output_data() local
484 length = get_unaligned_le16(gen5_pip->empty_buf); in cyapa_empty_pip_output_data()
485 if (length == GEN5_RESP_LENGTH_SIZE) { in cyapa_empty_pip_output_data()
488 } else if (length > CYAPA_REG_MAP_SIZE) { in cyapa_empty_pip_output_data()
491 } else if (length == 0) { in cyapa_empty_pip_output_data()
493 length = GEN5_RESP_LENGTH_SIZE; in cyapa_empty_pip_output_data()
495 func(cyapa, gen5_pip->empty_buf, length)) { in cyapa_empty_pip_output_data()
496 length = min(buf_len, length); in cyapa_empty_pip_output_data()
497 memcpy(buf, gen5_pip->empty_buf, length); in cyapa_empty_pip_output_data()
498 *len = length; in cyapa_empty_pip_output_data()
505 error = cyapa_i2c_pip_read(cyapa, gen5_pip->empty_buf, length); in cyapa_empty_pip_output_data()
511 length = get_unaligned_le16(gen5_pip->empty_buf); in cyapa_empty_pip_output_data()
512 if (length <= GEN5_RESP_LENGTH_SIZE) { in cyapa_empty_pip_output_data()
515 func(cyapa, gen5_pip->empty_buf, length)) { in cyapa_empty_pip_output_data()
516 length = min(buf_len, length); in cyapa_empty_pip_output_data()
517 memcpy(buf, gen5_pip->empty_buf, length); in cyapa_empty_pip_output_data()
518 *len = length; in cyapa_empty_pip_output_data()
567 int length; in cyapa_do_i2c_pip_cmd_polling() local
577 length = resp_len ? *resp_len : 0; in cyapa_do_i2c_pip_cmd_polling()
578 if (resp_data && resp_len && length != 0 && func) { in cyapa_do_i2c_pip_cmd_polling()
582 *resp_len = length; in cyapa_do_i2c_pip_cmd_polling()
765 int length; in gen5_idle_state_parse() local
781 length = get_unaligned_le16(&resp_data[GEN5_RESP_LENGTH_OFFSET]); in gen5_idle_state_parse()
782 if (length == GEN5_RESP_LENGTH_SIZE) { in gen5_idle_state_parse()
791 length = GEN5_HID_DESCRIPTOR_SIZE; in gen5_idle_state_parse()
794 resp_data, &length, in gen5_idle_state_parse()
801 length = get_unaligned_le16( in gen5_idle_state_parse()
804 if ((length == GEN5_HID_DESCRIPTOR_SIZE || in gen5_idle_state_parse()
805 length == GEN5_RESP_LENGTH_SIZE) && in gen5_idle_state_parse()
811 } else if ((length == GEN5_HID_DESCRIPTOR_SIZE || in gen5_idle_state_parse()
812 length == GEN5_RESP_LENGTH_SIZE) && in gen5_idle_state_parse()
829 int length; in gen5_hid_description_header_parse() local
845 length = get_unaligned_le16(&resp_data[GEN5_RESP_LENGTH_OFFSET]); in gen5_hid_description_header_parse()
847 if (length == GEN5_RESP_LENGTH_SIZE) { in gen5_hid_description_header_parse()
864 } else if (length == GEN5_HID_DESCRIPTOR_SIZE && in gen5_hid_description_header_parse()
870 } else if (length == GEN5_HID_DESCRIPTOR_SIZE && in gen5_hid_description_header_parse()
887 int length; in gen5_report_data_header_parse() local
889 length = get_unaligned_le16(®_data[GEN5_RESP_LENGTH_OFFSET]); in gen5_report_data_header_parse()
892 if (length < GEN5_TOUCH_REPORT_HEAD_SIZE || in gen5_report_data_header_parse()
893 length > GEN5_TOUCH_REPORT_MAX_SIZE) in gen5_report_data_header_parse()
899 if (length < GEN5_BTN_REPORT_HEAD_SIZE || in gen5_report_data_header_parse()
900 length > GEN5_BTN_REPORT_MAX_SIZE) in gen5_report_data_header_parse()
904 if (length != GEN5_WAKEUP_EVENT_SIZE) in gen5_report_data_header_parse()
919 int length; in gen5_cmd_resp_header_parse() local
927 length = get_unaligned_le16(®_data[GEN5_RESP_LENGTH_OFFSET]); in gen5_cmd_resp_header_parse()
928 ret = cyapa_i2c_pip_read(cyapa, gen5_pip->empty_buf, length); in gen5_cmd_resp_header_parse()
929 if (ret != length) in gen5_cmd_resp_header_parse()
932 if (length == GEN5_RESP_LENGTH_SIZE) { in gen5_cmd_resp_header_parse()
950 (gen5_pip->empty_buf[length - 1] == in gen5_cmd_resp_header_parse()
972 int length; in cyapa_gen5_state_parse() local
980 length = get_unaligned_le16(®_data[GEN5_RESP_LENGTH_OFFSET]); in cyapa_gen5_state_parse()
981 if (length == 0 || length == GEN5_RESP_LENGTH_SIZE) { in cyapa_gen5_state_parse()
983 } else if (length == GEN5_HID_DESCRIPTOR_SIZE && in cyapa_gen5_state_parse()
987 } else if ((length == GEN5_APP_REPORT_DESCRIPTOR_SIZE || in cyapa_gen5_state_parse()
988 length == GEN5_APP_CONTRACT_REPORT_DESCRIPTOR_SIZE) && in cyapa_gen5_state_parse()
993 } else if (length == GEN5_BL_REPORT_DESCRIPTOR_SIZE && in cyapa_gen5_state_parse()
1055 put_unaligned_le16(cmd_len - 2, &bl_cmd_head->length); in cyapa_gen5_bl_initiate()
1298 put_unaligned_le16(cmd_len - 2, &bl_cmd_head->length); in cyapa_gen5_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()
1734 put_unaligned_le16(sizeof(cmd) - 2, &app_cmd_head->length); in cyapa_gen5_calibrate_pwcs()
1940 put_unaligned_le16(sizeof(cmd) - 2, &cmd_head->length); in cyapa_gen5_read_idac_data()
2119 put_unaligned_le16(sizeof(cmd) - 2, &app_cmd_head->length); in cyapa_gen5_execute_panel_scan()
2171 put_unaligned_le16(sizeof(cmd) - 2, &app_cmd_head->length); in cyapa_gen5_read_panel_scan_raw_data()
2524 int length; in cyapa_gen5_irq_cmd_handler() local
2538 length = get_unaligned_le16(gen5_pip->irq_cmd_buf); in cyapa_gen5_irq_cmd_handler()
2539 length = (length <= GEN5_RESP_LENGTH_SIZE) ? in cyapa_gen5_irq_cmd_handler()
2540 GEN5_RESP_LENGTH_SIZE : length; in cyapa_gen5_irq_cmd_handler()
2541 if (length > GEN5_RESP_LENGTH_SIZE) in cyapa_gen5_irq_cmd_handler()
2543 gen5_pip->irq_cmd_buf, length); in cyapa_gen5_irq_cmd_handler()
2547 gen5_pip->irq_cmd_buf, length))) { in cyapa_gen5_irq_cmd_handler()
2560 length = 0; in cyapa_gen5_irq_cmd_handler()
2562 length = *gen5_pip->resp_len; in cyapa_gen5_irq_cmd_handler()
2565 &length, in cyapa_gen5_irq_cmd_handler()
2567 if (gen5_pip->resp_len && length != 0) { in cyapa_gen5_irq_cmd_handler()
2568 *gen5_pip->resp_len = length; in cyapa_gen5_irq_cmd_handler()
2576 *gen5_pip->resp_len = (*gen5_pip->resp_len < length) ? in cyapa_gen5_irq_cmd_handler()
2577 *gen5_pip->resp_len : length; in cyapa_gen5_irq_cmd_handler()