Lines Matching refs:i2c_msg
45 static int ec_i2c_count_message(const struct i2c_msg i2c_msgs[], int num) in ec_i2c_count_message()
72 static int ec_i2c_construct_message(u8 *buf, const struct i2c_msg i2c_msgs[], in ec_i2c_construct_message()
86 const struct i2c_msg *i2c_msg = &i2c_msgs[i]; in ec_i2c_construct_message() local
89 msg->len = i2c_msg->len; in ec_i2c_construct_message()
90 msg->addr_flags = i2c_msg->addr; in ec_i2c_construct_message()
92 if (i2c_msg->flags & I2C_M_TEN) in ec_i2c_construct_message()
95 if (i2c_msg->flags & I2C_M_RD) { in ec_i2c_construct_message()
98 memcpy(out_data, i2c_msg->buf, msg->len); in ec_i2c_construct_message()
114 static int ec_i2c_count_response(struct i2c_msg i2c_msgs[], int num) in ec_i2c_count_response()
139 static int ec_i2c_parse_response(const u8 *buf, struct i2c_msg i2c_msgs[], in ec_i2c_parse_response()
162 struct i2c_msg *i2c_msg = &i2c_msgs[i]; in ec_i2c_parse_response() local
165 memcpy(i2c_msg->buf, in_data, i2c_msg->len); in ec_i2c_parse_response()
166 in_data += i2c_msg->len; in ec_i2c_parse_response()
173 static int ec_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg i2c_msgs[], in ec_i2c_xfer()