Lines Matching refs:i2c_msg
46 static int ec_i2c_count_message(const struct i2c_msg i2c_msgs[], int num) in ec_i2c_count_message()
73 static int ec_i2c_construct_message(u8 *buf, const struct i2c_msg i2c_msgs[], in ec_i2c_construct_message()
87 const struct i2c_msg *i2c_msg = &i2c_msgs[i]; in ec_i2c_construct_message() local
90 msg->len = i2c_msg->len; in ec_i2c_construct_message()
91 msg->addr_flags = i2c_msg->addr; in ec_i2c_construct_message()
93 if (i2c_msg->flags & I2C_M_TEN) in ec_i2c_construct_message()
96 if (i2c_msg->flags & I2C_M_RD) { in ec_i2c_construct_message()
99 memcpy(out_data, i2c_msg->buf, msg->len); in ec_i2c_construct_message()
115 static int ec_i2c_count_response(struct i2c_msg i2c_msgs[], int num) in ec_i2c_count_response()
140 static int ec_i2c_parse_response(const u8 *buf, struct i2c_msg i2c_msgs[], in ec_i2c_parse_response()
163 struct i2c_msg *i2c_msg = &i2c_msgs[i]; in ec_i2c_parse_response() local
166 memcpy(i2c_msg->buf, in_data, i2c_msg->len); in ec_i2c_parse_response()
167 in_data += i2c_msg->len; in ec_i2c_parse_response()
174 static int ec_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg i2c_msgs[], in ec_i2c_xfer()