Lines Matching refs:i2c_msgs
46 static int ec_i2c_count_message(const struct i2c_msg i2c_msgs[], int num) in ec_i2c_count_message() argument
54 if (!(i2c_msgs[i].flags & I2C_M_RD)) in ec_i2c_count_message()
55 size += i2c_msgs[i].len; 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() argument
87 const struct i2c_msg *i2c_msg = &i2c_msgs[i]; in ec_i2c_construct_message()
115 static int ec_i2c_count_response(struct i2c_msg i2c_msgs[], int num) in ec_i2c_count_response() argument
122 if (i2c_msgs[i].flags & I2C_M_RD) in ec_i2c_count_response()
123 size += i2c_msgs[i].len; 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() argument
163 struct i2c_msg *i2c_msg = &i2c_msgs[i]; in ec_i2c_parse_response()
165 if (i2c_msgs[i].flags & I2C_M_RD) { in ec_i2c_parse_response()
174 static int ec_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg i2c_msgs[], in ec_i2c_xfer() argument
186 request_len = ec_i2c_count_message(i2c_msgs, num); in ec_i2c_xfer()
192 response_len = ec_i2c_count_response(i2c_msgs, num); in ec_i2c_xfer()
204 result = ec_i2c_construct_message(msg->data, i2c_msgs, num, bus_num); in ec_i2c_xfer()
221 result = ec_i2c_parse_response(msg->data, i2c_msgs, &num); in ec_i2c_xfer()