F: drivers/i2c/muxes/
F: include/linux/i2c-mux.h
++I2C MV64XXX MARVELL AND ALLWINNER DRIVER
++M: Gregory CLEMENT <gregory.clement@free-electrons.com>
++L: linux-i2c@vger.kernel.org
++S: Maintained
++F: drivers/i2c/busses/i2c-mv64xxx.c
++
I2C OVER PARALLEL PORT
M: Jean Delvare <jdelvare@suse.com>
L: linux-i2c@vger.kernel.org
{
struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
- if (i_dev->suspended) {
- i_dev->skip_resume = true;
- return 0;
- }
-
i_dev->disable(i_dev);
- i2c_dw_plat_prepare_clk(i_dev, false);
+ i2c_dw_prepare_clk(i_dev, false);
- i_dev->suspended = true;
-
return 0;
}
{
struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
- i2c_dw_plat_prepare_clk(i_dev, true);
- if (!i_dev->suspended)
- return 0;
-
- if (i_dev->skip_resume) {
- i_dev->skip_resume = false;
- return 0;
- }
-
+ i2c_dw_prepare_clk(i_dev, true);
i_dev->init(i_dev);
- i_dev->suspended = false;
-
return 0;
}
msg[1].flags |= I2C_M_RECV_LEN;
msg[1].len = 1; /* block length will be added by
the underlying bus driver */
+ i2c_smbus_try_get_dmabuf(&msg[1], 0);
break;
case I2C_SMBUS_I2C_BLOCK_DATA:
+ if (data->block[0] > I2C_SMBUS_BLOCK_MAX) {
+ dev_err(&adapter->dev, "Invalid block %s size %d\n",
+ read_write == I2C_SMBUS_READ ? "read" : "write",
+ data->block[0]);
+ return -EINVAL;
+ }
+
if (read_write == I2C_SMBUS_READ) {
msg[1].len = data->block[0];
+ i2c_smbus_try_get_dmabuf(&msg[1], 0);
} else {
msg[0].len = data->block[0] + 1;
- if (msg[0].len > I2C_SMBUS_BLOCK_MAX + 1) {
- dev_err(&adapter->dev,
- "Invalid block write size %d\n",
- data->block[0]);
- return -EINVAL;
- }
+
+ i2c_smbus_try_get_dmabuf(&msg[0], command);
for (i = 1; i <= data->block[0]; i++)
- msgbuf0[i] = data->block[i];
+ msg[0].buf[i] = data->block[i];
}
break;
default: