Commit 534eb6de authored by Wolfram Sang's avatar Wolfram Sang
Browse files

Merge tag 'i2c-host-fixes-6.16-rc5' of...

Merge tag 'i2c-host-fixes-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current

i2c-host-fixes for v6.16-rc5

designware: initialise msg_write_idx during transfer
microchip: check return value from core xfer call
realtek: add 'reg' property constraint to the device tree
parents d0b3b7b2 5f05fc6e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -26,7 +26,8 @@ properties:
      - const: realtek,rtl9301-i2c

  reg:
    description: Register offset and size this I2C controller.
    items:
      - description: Register offset and size this I2C controller.

  "#address-cells":
    const: 1
+1 −0
Original line number Diff line number Diff line
@@ -363,6 +363,7 @@ static int amd_i2c_dw_xfer_quirk(struct i2c_adapter *adap, struct i2c_msg *msgs,

	dev->msgs = msgs;
	dev->msgs_num = num_msgs;
	dev->msg_write_idx = 0;
	i2c_dw_xfer_init(dev);

	/* Initiate messages read/write transaction */
+5 −1
Original line number Diff line number Diff line
@@ -435,6 +435,7 @@ static int mchp_corei2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned
	u8 tx_buf[I2C_SMBUS_BLOCK_MAX + 2];
	u8 rx_buf[I2C_SMBUS_BLOCK_MAX + 1];
	int num_msgs = 1;
	int ret;

	msgs[CORE_I2C_SMBUS_MSG_WR].addr = addr;
	msgs[CORE_I2C_SMBUS_MSG_WR].flags = 0;
@@ -505,7 +506,10 @@ static int mchp_corei2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned
		return -EOPNOTSUPP;
	}

	mchp_corei2c_xfer(&idev->adapter, msgs, num_msgs);
	ret = mchp_corei2c_xfer(&idev->adapter, msgs, num_msgs);
	if (ret < 0)
		return ret;

	if (read_write == I2C_SMBUS_WRITE || size <= I2C_SMBUS_BYTE_DATA)
		return 0;