Lines Matching full:msg

22 	struct cros_ec_command *msg;  member
30 struct cros_ec_command *msg = priv->msg; in cros_ec_proto_test_prepare_tx_legacy_normal() local
36 msg->command = EC_CMD_HELLO; in cros_ec_proto_test_prepare_tx_legacy_normal()
37 msg->outsize = EC_PROTO2_MAX_PARAM_SIZE; in cros_ec_proto_test_prepare_tx_legacy_normal()
38 msg->data[0] = 0xde; in cros_ec_proto_test_prepare_tx_legacy_normal()
39 msg->data[1] = 0xad; in cros_ec_proto_test_prepare_tx_legacy_normal()
40 msg->data[2] = 0xbe; in cros_ec_proto_test_prepare_tx_legacy_normal()
41 msg->data[3] = 0xef; in cros_ec_proto_test_prepare_tx_legacy_normal()
43 ret = cros_ec_prepare_tx(ec_dev, msg); in cros_ec_proto_test_prepare_tx_legacy_normal()
73 struct cros_ec_command *msg = priv->msg; in cros_ec_proto_test_prepare_tx_legacy_bad_msg_outsize() local
78 msg->outsize = EC_PROTO2_MAX_PARAM_SIZE + 1; in cros_ec_proto_test_prepare_tx_legacy_bad_msg_outsize()
80 ret = cros_ec_prepare_tx(ec_dev, msg); in cros_ec_proto_test_prepare_tx_legacy_bad_msg_outsize()
88 struct cros_ec_command *msg = priv->msg; in cros_ec_proto_test_prepare_tx_normal() local
93 msg->command = EC_CMD_HELLO; in cros_ec_proto_test_prepare_tx_normal()
94 msg->outsize = 0x88; in cros_ec_proto_test_prepare_tx_normal()
95 msg->data[0] = 0xde; in cros_ec_proto_test_prepare_tx_normal()
96 msg->data[1] = 0xad; in cros_ec_proto_test_prepare_tx_normal()
97 msg->data[2] = 0xbe; in cros_ec_proto_test_prepare_tx_normal()
98 msg->data[3] = 0xef; in cros_ec_proto_test_prepare_tx_normal()
100 ret = cros_ec_prepare_tx(ec_dev, msg); in cros_ec_proto_test_prepare_tx_normal()
129 struct cros_ec_command *msg = priv->msg; in cros_ec_proto_test_prepare_tx_bad_msg_outsize() local
132 msg->outsize = ec_dev->dout_size - sizeof(struct ec_host_request) + 1; in cros_ec_proto_test_prepare_tx_bad_msg_outsize()
134 ret = cros_ec_prepare_tx(ec_dev, msg); in cros_ec_proto_test_prepare_tx_bad_msg_outsize()
142 struct cros_ec_command *msg = priv->msg; in cros_ec_proto_test_check_result() local
168 msg->result = status[i]; in cros_ec_proto_test_check_result()
169 ret = cros_ec_check_result(ec_dev, msg); in cros_ec_proto_test_check_result()
173 msg->result = EC_RES_IN_PROGRESS; in cros_ec_proto_test_check_result()
174 ret = cros_ec_check_result(ec_dev, msg); in cros_ec_proto_test_check_result()
266 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_normal()
267 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_normal()
268 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_normal()
270 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_normal()
284 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_normal()
285 KUNIT_EXPECT_EQ(test, mock->msg.command, in cros_ec_proto_test_query_all_normal()
288 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_normal()
290 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_normal()
302 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_normal()
303 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_CMD_VERSIONS); in cros_ec_proto_test_query_all_normal()
304 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_normal()
306 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(*data)); in cros_ec_proto_test_query_all_normal()
321 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_normal()
322 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_CMD_VERSIONS); in cros_ec_proto_test_query_all_normal()
323 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_normal()
325 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(*data)); in cros_ec_proto_test_query_all_normal()
338 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_normal()
339 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_HOST_EVENT_GET_WAKE_MASK); in cros_ec_proto_test_query_all_normal()
340 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(struct ec_response_host_event_mask)); in cros_ec_proto_test_query_all_normal()
341 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_normal()
388 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_pd_return_error()
389 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_no_pd_return_error()
390 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_pd_return_error()
392 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_pd_return_error()
400 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_pd_return_error()
401 KUNIT_EXPECT_EQ(test, mock->msg.command, in cros_ec_proto_test_query_all_no_pd_return_error()
404 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_pd_return_error()
406 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_pd_return_error()
453 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_pd_return0()
454 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_no_pd_return0()
455 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_pd_return0()
457 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_pd_return0()
465 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_pd_return0()
466 KUNIT_EXPECT_EQ(test, mock->msg.command, in cros_ec_proto_test_query_all_no_pd_return0()
469 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_pd_return0()
471 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_pd_return0()
510 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_legacy_normal_v3_return_error()
511 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_legacy_normal_v3_return_error()
512 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_legacy_normal_v3_return_error()
514 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_legacy_normal_v3_return_error()
524 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_legacy_normal_v3_return_error()
525 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_HELLO); in cros_ec_proto_test_query_all_legacy_normal_v3_return_error()
526 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(struct ec_response_hello)); in cros_ec_proto_test_query_all_legacy_normal_v3_return_error()
527 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(*data)); in cros_ec_proto_test_query_all_legacy_normal_v3_return_error()
575 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_legacy_normal_v3_return0()
576 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_legacy_normal_v3_return0()
577 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_legacy_normal_v3_return0()
579 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_legacy_normal_v3_return0()
589 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_legacy_normal_v3_return0()
590 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_HELLO); in cros_ec_proto_test_query_all_legacy_normal_v3_return0()
591 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(struct ec_response_hello)); in cros_ec_proto_test_query_all_legacy_normal_v3_return0()
592 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(*data)); in cros_ec_proto_test_query_all_legacy_normal_v3_return0()
636 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_legacy_xfer_error()
637 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_legacy_xfer_error()
638 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_legacy_xfer_error()
640 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_legacy_xfer_error()
648 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_legacy_xfer_error()
649 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_HELLO); in cros_ec_proto_test_query_all_legacy_xfer_error()
650 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(struct ec_response_hello)); in cros_ec_proto_test_query_all_legacy_xfer_error()
651 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(struct ec_params_hello)); in cros_ec_proto_test_query_all_legacy_xfer_error()
684 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_legacy_return_error()
685 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_legacy_return_error()
686 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_legacy_return_error()
688 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_legacy_return_error()
696 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_legacy_return_error()
697 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_HELLO); in cros_ec_proto_test_query_all_legacy_return_error()
698 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(struct ec_response_hello)); in cros_ec_proto_test_query_all_legacy_return_error()
699 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(struct ec_params_hello)); in cros_ec_proto_test_query_all_legacy_return_error()
737 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_legacy_data_error()
738 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_legacy_data_error()
739 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_legacy_data_error()
741 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_legacy_data_error()
749 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_legacy_data_error()
750 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_HELLO); in cros_ec_proto_test_query_all_legacy_data_error()
751 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(struct ec_response_hello)); in cros_ec_proto_test_query_all_legacy_data_error()
752 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(struct ec_params_hello)); in cros_ec_proto_test_query_all_legacy_data_error()
785 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_legacy_return0()
786 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_legacy_return0()
787 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_legacy_return0()
789 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_legacy_return0()
797 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_legacy_return0()
798 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_HELLO); in cros_ec_proto_test_query_all_legacy_return0()
799 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(struct ec_response_hello)); in cros_ec_proto_test_query_all_legacy_return0()
800 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(struct ec_params_hello)); in cros_ec_proto_test_query_all_legacy_return0()
856 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_mkbp()
857 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_no_mkbp()
858 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_mkbp()
860 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_mkbp()
868 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_mkbp()
869 KUNIT_EXPECT_EQ(test, mock->msg.command, in cros_ec_proto_test_query_all_no_mkbp()
872 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_mkbp()
874 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_mkbp()
884 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_mkbp()
885 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_CMD_VERSIONS); in cros_ec_proto_test_query_all_no_mkbp()
886 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_mkbp()
888 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(*data)); in cros_ec_proto_test_query_all_no_mkbp()
944 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_mkbp_return_error()
945 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_no_mkbp_return_error()
946 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_mkbp_return_error()
948 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_mkbp_return_error()
956 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_mkbp_return_error()
957 KUNIT_EXPECT_EQ(test, mock->msg.command, in cros_ec_proto_test_query_all_no_mkbp_return_error()
960 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_mkbp_return_error()
962 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_mkbp_return_error()
972 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_mkbp_return_error()
973 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_CMD_VERSIONS); in cros_ec_proto_test_query_all_no_mkbp_return_error()
974 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_mkbp_return_error()
976 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(*data)); in cros_ec_proto_test_query_all_no_mkbp_return_error()
1032 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_mkbp_return0()
1033 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_no_mkbp_return0()
1034 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_mkbp_return0()
1036 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_mkbp_return0()
1044 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_mkbp_return0()
1045 KUNIT_EXPECT_EQ(test, mock->msg.command, in cros_ec_proto_test_query_all_no_mkbp_return0()
1048 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_mkbp_return0()
1050 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_mkbp_return0()
1060 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_mkbp_return0()
1061 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_CMD_VERSIONS); in cros_ec_proto_test_query_all_no_mkbp_return0()
1062 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_mkbp_return0()
1064 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(*data)); in cros_ec_proto_test_query_all_no_mkbp_return0()
1131 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_host_sleep()
1132 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_no_host_sleep()
1133 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_host_sleep()
1135 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_host_sleep()
1143 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_host_sleep()
1144 KUNIT_EXPECT_EQ(test, mock->msg.command, in cros_ec_proto_test_query_all_no_host_sleep()
1147 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_host_sleep()
1149 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_host_sleep()
1157 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_host_sleep()
1158 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_CMD_VERSIONS); in cros_ec_proto_test_query_all_no_host_sleep()
1159 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_host_sleep()
1161 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(struct ec_params_get_cmd_versions)); in cros_ec_proto_test_query_all_no_host_sleep()
1169 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_host_sleep()
1170 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_CMD_VERSIONS); in cros_ec_proto_test_query_all_no_host_sleep()
1171 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_host_sleep()
1173 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(struct ec_params_get_cmd_versions)); in cros_ec_proto_test_query_all_no_host_sleep()
1238 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_host_sleep_return0()
1239 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_no_host_sleep_return0()
1240 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_host_sleep_return0()
1242 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_host_sleep_return0()
1250 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_host_sleep_return0()
1251 KUNIT_EXPECT_EQ(test, mock->msg.command, in cros_ec_proto_test_query_all_no_host_sleep_return0()
1254 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_host_sleep_return0()
1256 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_no_host_sleep_return0()
1264 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_host_sleep_return0()
1265 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_CMD_VERSIONS); in cros_ec_proto_test_query_all_no_host_sleep_return0()
1266 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_host_sleep_return0()
1268 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(struct ec_params_get_cmd_versions)); in cros_ec_proto_test_query_all_no_host_sleep_return0()
1276 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_no_host_sleep_return0()
1277 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_CMD_VERSIONS); in cros_ec_proto_test_query_all_no_host_sleep_return0()
1278 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_no_host_sleep_return0()
1280 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(struct ec_params_get_cmd_versions)); in cros_ec_proto_test_query_all_no_host_sleep_return0()
1345 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1346 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1347 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1349 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1357 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1358 KUNIT_EXPECT_EQ(test, mock->msg.command, in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1361 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1363 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1371 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1372 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_CMD_VERSIONS); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1373 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1375 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(struct ec_params_get_cmd_versions)); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1383 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1384 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_CMD_VERSIONS); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1385 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1387 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(struct ec_params_get_cmd_versions)); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1397 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1398 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_HOST_EVENT_GET_WAKE_MASK); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1399 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(struct ec_response_host_event_mask)); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1400 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_default_wake_mask_return_error()
1472 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1473 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_PROTOCOL_INFO); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1474 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_default_wake_mask_return0()
1476 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1484 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1485 KUNIT_EXPECT_EQ(test, mock->msg.command, in cros_ec_proto_test_query_all_default_wake_mask_return0()
1488 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_default_wake_mask_return0()
1490 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1498 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1499 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_CMD_VERSIONS); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1500 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_default_wake_mask_return0()
1502 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(struct ec_params_get_cmd_versions)); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1510 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1511 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_CMD_VERSIONS); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1512 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_query_all_default_wake_mask_return0()
1514 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(struct ec_params_get_cmd_versions)); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1524 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1525 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_HOST_EVENT_GET_WAKE_MASK); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1526 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(struct ec_response_host_event_mask)); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1527 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_query_all_default_wake_mask_return0()
1581 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_cmd_xfer_normal()
1582 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_HELLO); in cros_ec_proto_test_cmd_xfer_normal()
1583 KUNIT_EXPECT_EQ(test, mock->msg.insize, 4); in cros_ec_proto_test_cmd_xfer_normal()
1584 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 2); in cros_ec_proto_test_cmd_xfer_normal()
1626 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_cmd_xfer_excess_msg_insize()
1627 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_HELLO); in cros_ec_proto_test_cmd_xfer_excess_msg_insize()
1628 KUNIT_EXPECT_EQ(test, mock->msg.insize, 0xee); in cros_ec_proto_test_cmd_xfer_excess_msg_insize()
1629 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 2); in cros_ec_proto_test_cmd_xfer_excess_msg_insize()
1678 struct cros_ec_command msg; in cros_ec_proto_test_cmd_xfer_protocol_v3_normal() local
1680 memset(&msg, 0, sizeof(msg)); in cros_ec_proto_test_cmd_xfer_protocol_v3_normal()
1686 ret = cros_ec_cmd_xfer(ec_dev, &msg); in cros_ec_proto_test_cmd_xfer_protocol_v3_normal()
1698 struct cros_ec_command msg; in cros_ec_proto_test_cmd_xfer_protocol_v3_no_op() local
1700 memset(&msg, 0, sizeof(msg)); in cros_ec_proto_test_cmd_xfer_protocol_v3_no_op()
1706 ret = cros_ec_cmd_xfer(ec_dev, &msg); in cros_ec_proto_test_cmd_xfer_protocol_v3_no_op()
1715 struct cros_ec_command msg; in cros_ec_proto_test_cmd_xfer_protocol_v2_normal() local
1717 memset(&msg, 0, sizeof(msg)); in cros_ec_proto_test_cmd_xfer_protocol_v2_normal()
1723 ret = cros_ec_cmd_xfer(ec_dev, &msg); in cros_ec_proto_test_cmd_xfer_protocol_v2_normal()
1735 struct cros_ec_command msg; in cros_ec_proto_test_cmd_xfer_protocol_v2_no_op() local
1737 memset(&msg, 0, sizeof(msg)); in cros_ec_proto_test_cmd_xfer_protocol_v2_no_op()
1743 ret = cros_ec_cmd_xfer(ec_dev, &msg); in cros_ec_proto_test_cmd_xfer_protocol_v2_no_op()
1753 struct cros_ec_command msg; in cros_ec_proto_test_cmd_xfer_in_progress_normal() local
1755 memset(&msg, 0, sizeof(msg)); in cros_ec_proto_test_cmd_xfer_in_progress_normal()
1776 ret = cros_ec_cmd_xfer(ec_dev, &msg); in cros_ec_proto_test_cmd_xfer_in_progress_normal()
1779 KUNIT_EXPECT_EQ(test, msg.result, EC_RES_SUCCESS); in cros_ec_proto_test_cmd_xfer_in_progress_normal()
1792 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_cmd_xfer_in_progress_normal()
1793 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_COMMS_STATUS); in cros_ec_proto_test_cmd_xfer_in_progress_normal()
1794 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_cmd_xfer_in_progress_normal()
1796 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_cmd_xfer_in_progress_normal()
1808 struct cros_ec_command msg; in cros_ec_proto_test_cmd_xfer_in_progress_retries_eagain() local
1810 memset(&msg, 0, sizeof(msg)); in cros_ec_proto_test_cmd_xfer_in_progress_retries_eagain()
1823 ret = cros_ec_cmd_xfer(ec_dev, &msg); in cros_ec_proto_test_cmd_xfer_in_progress_retries_eagain()
1836 struct cros_ec_command msg; in cros_ec_proto_test_cmd_xfer_in_progress_retries_status_processing() local
1838 memset(&msg, 0, sizeof(msg)); in cros_ec_proto_test_cmd_xfer_in_progress_retries_status_processing()
1862 ret = cros_ec_cmd_xfer(ec_dev, &msg); in cros_ec_proto_test_cmd_xfer_in_progress_retries_status_processing()
1875 struct cros_ec_command msg; in cros_ec_proto_test_cmd_xfer_in_progress_xfer_error() local
1877 memset(&msg, 0, sizeof(msg)); in cros_ec_proto_test_cmd_xfer_in_progress_xfer_error()
1891 ret = cros_ec_cmd_xfer(ec_dev, &msg); in cros_ec_proto_test_cmd_xfer_in_progress_xfer_error()
1901 struct cros_ec_command msg; in cros_ec_proto_test_cmd_xfer_in_progress_return_error() local
1903 memset(&msg, 0, sizeof(msg)); in cros_ec_proto_test_cmd_xfer_in_progress_return_error()
1919 ret = cros_ec_cmd_xfer(ec_dev, &msg); in cros_ec_proto_test_cmd_xfer_in_progress_return_error()
1922 KUNIT_EXPECT_EQ(test, msg.result, EC_RES_INVALID_COMMAND); in cros_ec_proto_test_cmd_xfer_in_progress_return_error()
1933 struct cros_ec_command msg; in cros_ec_proto_test_cmd_xfer_in_progress_return0() local
1935 memset(&msg, 0, sizeof(msg)); in cros_ec_proto_test_cmd_xfer_in_progress_return0()
1951 ret = cros_ec_cmd_xfer(ec_dev, &msg); in cros_ec_proto_test_cmd_xfer_in_progress_return0()
1963 struct cros_ec_command msg; in cros_ec_proto_test_cmd_xfer_status_normal() local
1965 memset(&msg, 0, sizeof(msg)); in cros_ec_proto_test_cmd_xfer_status_normal()
1973 ret = cros_ec_cmd_xfer_status(ec_dev, &msg); in cros_ec_proto_test_cmd_xfer_status_normal()
1983 struct cros_ec_command msg; in cros_ec_proto_test_cmd_xfer_status_xfer_error() local
1985 memset(&msg, 0, sizeof(msg)); in cros_ec_proto_test_cmd_xfer_status_xfer_error()
1993 ret = cros_ec_cmd_xfer_status(ec_dev, &msg); in cros_ec_proto_test_cmd_xfer_status_xfer_error()
2003 struct cros_ec_command msg; in cros_ec_proto_test_cmd_xfer_status_return_error() local
2034 memset(&msg, 0, sizeof(msg)); in cros_ec_proto_test_cmd_xfer_status_return_error()
2040 ret = cros_ec_cmd_xfer_status(ec_dev, &msg); in cros_ec_proto_test_cmd_xfer_status_return_error()
2086 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_get_next_event_no_mkbp_event()
2087 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_MKBP_STATE); in cros_ec_proto_test_get_next_event_no_mkbp_event()
2088 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(union ec_response_get_next_data_v3)); in cros_ec_proto_test_get_next_event_no_mkbp_event()
2089 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_get_next_event_no_mkbp_event()
2148 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_get_next_event_mkbp_event_version0()
2149 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_NEXT_EVENT); in cros_ec_proto_test_get_next_event_mkbp_event_version0()
2150 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(struct ec_response_get_next_event)); in cros_ec_proto_test_get_next_event_mkbp_event_version0()
2151 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_get_next_event_mkbp_event_version0()
2197 KUNIT_EXPECT_EQ(test, mock->msg.version, 2); in cros_ec_proto_test_get_next_event_mkbp_event_version2()
2198 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_NEXT_EVENT); in cros_ec_proto_test_get_next_event_mkbp_event_version2()
2199 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_get_next_event_mkbp_event_version2()
2201 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_get_next_event_mkbp_event_version2()
2246 KUNIT_EXPECT_EQ(test, mock->msg.version, 2); in cros_ec_proto_test_get_next_event_mkbp_event_host_event_rtc()
2247 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_NEXT_EVENT); in cros_ec_proto_test_get_next_event_mkbp_event_host_event_rtc()
2248 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_get_next_event_mkbp_event_host_event_rtc()
2250 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_get_next_event_mkbp_event_host_event_rtc()
2296 KUNIT_EXPECT_EQ(test, mock->msg.version, 2); in cros_ec_proto_test_get_next_event_mkbp_event_host_event_masked()
2297 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_NEXT_EVENT); in cros_ec_proto_test_get_next_event_mkbp_event_host_event_masked()
2298 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_get_next_event_mkbp_event_host_event_masked()
2300 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_get_next_event_mkbp_event_host_event_masked()
2427 KUNIT_EXPECT_EQ(test, mock->msg.version, 0); in cros_ec_proto_test_check_features_not_cached()
2428 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_FEATURES); in cros_ec_proto_test_check_features_not_cached()
2429 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(struct ec_response_get_features)); in cros_ec_proto_test_check_features_not_cached()
2430 KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0); in cros_ec_proto_test_check_features_not_cached()
2469 KUNIT_EXPECT_EQ(test, mock->msg.version, 1); in cros_ec_proto_test_get_sensor_count_normal()
2470 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_MOTION_SENSE_CMD); in cros_ec_proto_test_get_sensor_count_normal()
2471 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(struct ec_response_motion_sense)); in cros_ec_proto_test_get_sensor_count_normal()
2472 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(*data)); in cros_ec_proto_test_get_sensor_count_normal()
2509 KUNIT_EXPECT_EQ(test, mock->msg.version, 1); in cros_ec_proto_test_get_sensor_count_xfer_error()
2510 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_MOTION_SENSE_CMD); in cros_ec_proto_test_get_sensor_count_xfer_error()
2511 KUNIT_EXPECT_EQ(test, mock->msg.insize, sizeof(struct ec_response_motion_sense)); in cros_ec_proto_test_get_sensor_count_xfer_error()
2512 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(*data)); in cros_ec_proto_test_get_sensor_count_xfer_error()
2567 KUNIT_EXPECT_EQ(test, mock->msg.version, 1); in cros_ec_proto_test_get_sensor_count_legacy()
2568 KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_MOTION_SENSE_CMD); in cros_ec_proto_test_get_sensor_count_legacy()
2569 KUNIT_EXPECT_EQ(test, mock->msg.insize, in cros_ec_proto_test_get_sensor_count_legacy()
2571 KUNIT_EXPECT_EQ(test, mock->msg.outsize, sizeof(*data)); in cros_ec_proto_test_get_sensor_count_legacy()
2619 KUNIT_EXPECT_EQ(test, mock->msg.version, 0x88); in cros_ec_proto_test_ec_cmd()
2620 KUNIT_EXPECT_EQ(test, mock->msg.command, 0x77); in cros_ec_proto_test_ec_cmd()
2621 KUNIT_EXPECT_EQ(test, mock->msg.insize, ARRAY_SIZE(in)); in cros_ec_proto_test_ec_cmd()
2622 KUNIT_EXPECT_EQ(test, mock->msg.outsize, ARRAY_SIZE(out)); in cros_ec_proto_test_ec_cmd()
2661 priv->msg = (struct cros_ec_command *)priv->_msg; in cros_ec_proto_test_init()