Lines Matching refs:msg
93 struct ec_params_i2c_passthru_msg *msg = ¶ms->msg[i]; in ec_i2c_construct_message() local
95 msg->len = i2c_msg->len; in ec_i2c_construct_message()
96 msg->addr_flags = i2c_msg->addr; in ec_i2c_construct_message()
102 msg->addr_flags |= EC_I2C_FLAG_READ; in ec_i2c_construct_message()
104 memcpy(out_data, i2c_msg->buf, msg->len); in ec_i2c_construct_message()
105 out_data += msg->len; in ec_i2c_construct_message()
187 struct cros_ec_command *msg; in ec_i2c_xfer() local
203 msg = kmalloc(sizeof(*msg) + alloc_size, GFP_KERNEL); in ec_i2c_xfer()
204 if (!msg) in ec_i2c_xfer()
207 result = ec_i2c_construct_message(msg->data, i2c_msgs, num, bus_num); in ec_i2c_xfer()
213 msg->version = 0; in ec_i2c_xfer()
214 msg->command = EC_CMD_I2C_PASSTHRU; in ec_i2c_xfer()
215 msg->outsize = request_len; in ec_i2c_xfer()
216 msg->insize = response_len; in ec_i2c_xfer()
218 result = cros_ec_cmd_xfer(bus->ec, msg); in ec_i2c_xfer()
224 result = ec_i2c_parse_response(msg->data, i2c_msgs, &num); in ec_i2c_xfer()
233 kfree(msg); in ec_i2c_xfer()