read_msg
ret = spi_sync(data->spi, &data->read_msg);
struct spi_message read_msg;
spi_message_init_with_transfers(&data->read_msg, data->read_xfer, 2);
ret = devm_spi_optimize_message(dev, spi, &data->read_msg);
debug_info->read_msg);
debug_info->read_msg = devm_kzalloc(ec->dev,
sizeof(*debug_info->read_msg) +
if (!debug_info->read_msg)
debug_info->read_msg->version = 1;
debug_info->read_msg->command = EC_CMD_CONSOLE_READ + ec->cmd_offset;
debug_info->read_msg->outsize = read_params_size;
debug_info->read_msg->insize = read_response_size;
struct cros_ec_command *read_msg;
(struct ec_params_console_read_v1 *)debug_info->read_msg->data;
uint8_t *ec_buffer = (uint8_t *)debug_info->read_msg->data;
read_msg(cmd_fd, &msg, 1);
read_msg(cmd_fd, &msg, 1);
read_msg(cmd_fd, &msg, 0);