Lines Matching refs:msgs
367 static int mchp_corei2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
371 struct i2c_msg *this_msg = msgs;
382 idev->msg_queue = msgs;
396 struct i2c_msg *next_msg = msgs + 1;
433 struct i2c_msg msgs[2];
440 msgs[CORE_I2C_SMBUS_MSG_WR].addr = addr;
441 msgs[CORE_I2C_SMBUS_MSG_WR].flags = 0;
444 msgs[CORE_I2C_SMBUS_MSG_WR].flags = I2C_M_RD;
447 msgs[CORE_I2C_SMBUS_MSG_WR].len = size;
450 msgs[CORE_I2C_SMBUS_MSG_WR].buf = tx_buf;
451 msgs[CORE_I2C_SMBUS_MSG_WR].buf[0] = command;
455 msgs[CORE_I2C_SMBUS_MSG_WR].buf = tx_buf;
456 msgs[CORE_I2C_SMBUS_MSG_WR].buf[0] = command;
457 msgs[CORE_I2C_SMBUS_MSG_RD].addr = addr;
458 msgs[CORE_I2C_SMBUS_MSG_RD].flags = I2C_M_RD;
463 msgs[CORE_I2C_SMBUS_MSG_WR].len = 1;
467 msgs[CORE_I2C_SMBUS_MSG_WR].buf = NULL;
471 msgs[CORE_I2C_SMBUS_MSG_WR].buf = &command;
473 msgs[CORE_I2C_SMBUS_MSG_WR].buf = &data->byte;
477 msgs[CORE_I2C_SMBUS_MSG_WR].buf[1] = data->byte;
479 msgs[CORE_I2C_SMBUS_MSG_RD].len = size - 1;
480 msgs[CORE_I2C_SMBUS_MSG_RD].buf = &data->byte;
485 msgs[CORE_I2C_SMBUS_MSG_WR].buf[1] = data->word & 0xFF;
486 msgs[CORE_I2C_SMBUS_MSG_WR].buf[2] = (data->word >> 8) & 0xFF;
488 msgs[CORE_I2C_SMBUS_MSG_RD].len = size - 1;
489 msgs[CORE_I2C_SMBUS_MSG_RD].buf = rx_buf;
497 msgs[CORE_I2C_SMBUS_MSG_WR].len = data_len + 2;
499 msgs[CORE_I2C_SMBUS_MSG_WR].buf[i + 1] = data->block[i];
501 msgs[CORE_I2C_SMBUS_MSG_RD].len = I2C_SMBUS_BLOCK_MAX + 1;
502 msgs[CORE_I2C_SMBUS_MSG_RD].buf = rx_buf;
509 ret = mchp_corei2c_xfer(&idev->adapter, msgs, num_msgs);