mirror of
https://github.com/torvalds/linux.git
synced 2025-12-01 07:26:02 +07:00
Merge tag 'i2c-for-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang: - designware: initialise msg_write_idx during transfer - microchip: check return value from core xfer call - realtek: add 'reg' property constraint to the device tree * tag 'i2c-for-6.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: dt-bindings: i2c: realtek,rtl9301: Fix missing 'reg' constraint i2c: microchip-core: re-fix fake detections w/ i2cdetect i2c/designware: Fix an initialization issue
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user