Lines Matching defs:msgs
368 gmbus_is_index_read(struct i2c_msg *msgs, int i, int num)
371 !(msgs[i].flags & I2C_M_RD) && msgs[i].len <= 2 &&
372 (msgs[i + 1].flags & I2C_M_RD));
376 gmbus_xfer_index_read(struct drm_i915_private *dev_priv, struct i2c_msg *msgs)
383 if (msgs[0].len == 2)
385 msgs[0].buf[1] | (msgs[0].buf[0] << 8);
386 if (msgs[0].len == 1)
388 (msgs[0].buf[0] << GMBUS_SLAVE_INDEX_SHIFT);
394 ret = gmbus_xfer_read(dev_priv, &msgs[1], gmbus1_index);
405 struct i2c_msg *msgs,
418 ret = i2c_bit_algo.master_xfer(adapter, msgs, num);
427 if (gmbus_is_index_read(msgs, i, num)) {
428 ret = gmbus_xfer_index_read(dev_priv, &msgs[i]);
430 } else if (msgs[i].flags & I2C_M_RD) {
431 ret = gmbus_xfer_read(dev_priv, &msgs[i], 0);
433 ret = gmbus_xfer_write(dev_priv, &msgs[i]);
498 adapter->name, msgs[i].addr,
499 (msgs[i].flags & I2C_M_RD) ? 'r' : 'w', msgs[i].len);
510 ret = i2c_bit_algo.master_xfer(adapter, msgs, num);