Lines Matching refs:i2c_msg
51 static int ec_i2c_count_message(const struct i2c_msg i2c_msgs[], int num) in ec_i2c_count_message()
78 static int ec_i2c_construct_message(u8 *buf, const struct i2c_msg i2c_msgs[], in ec_i2c_construct_message()
92 const struct i2c_msg *i2c_msg = &i2c_msgs[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()
98 if (i2c_msg->flags & I2C_M_TEN) in ec_i2c_construct_message()
101 if (i2c_msg->flags & I2C_M_RD) { in ec_i2c_construct_message()
104 memcpy(out_data, i2c_msg->buf, msg->len); in ec_i2c_construct_message()
120 static int ec_i2c_count_response(struct i2c_msg i2c_msgs[], int num) in ec_i2c_count_response()
145 static int ec_i2c_parse_response(const u8 *buf, struct i2c_msg i2c_msgs[], in ec_i2c_parse_response()
166 struct i2c_msg *i2c_msg = &i2c_msgs[i]; in ec_i2c_parse_response() local
169 memcpy(i2c_msg->buf, in_data, i2c_msg->len); in ec_i2c_parse_response()
170 in_data += i2c_msg->len; in ec_i2c_parse_response()
177 static int ec_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg i2c_msgs[], in ec_i2c_xfer()