Skip to content

Commit fd860cd

Browse files
committed
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
2 parents a79a588 + 534eb6d commit fd860cd

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ properties:
2626
- const: realtek,rtl9301-i2c
2727

2828
reg:
29-
description: Register offset and size this I2C controller.
29+
items:
30+
- description: Register offset and size this I2C controller.
3031

3132
"#address-cells":
3233
const: 1

drivers/i2c/busses/i2c-designware-master.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ static int amd_i2c_dw_xfer_quirk(struct i2c_adapter *adap, struct i2c_msg *msgs,
363363

364364
dev->msgs = msgs;
365365
dev->msgs_num = num_msgs;
366+
dev->msg_write_idx = 0;
366367
i2c_dw_xfer_init(dev);
367368

368369
/* Initiate messages read/write transaction */

drivers/i2c/busses/i2c-microchip-corei2c.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ static int mchp_corei2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned
435435
u8 tx_buf[I2C_SMBUS_BLOCK_MAX + 2];
436436
u8 rx_buf[I2C_SMBUS_BLOCK_MAX + 1];
437437
int num_msgs = 1;
438+
int ret;
438439

439440
msgs[CORE_I2C_SMBUS_MSG_WR].addr = addr;
440441
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
505506
return -EOPNOTSUPP;
506507
}
507508

508-
mchp_corei2c_xfer(&idev->adapter, msgs, num_msgs);
509+
ret = mchp_corei2c_xfer(&idev->adapter, msgs, num_msgs);
510+
if (ret < 0)
511+
return ret;
512+
509513
if (read_write == I2C_SMBUS_WRITE || size <= I2C_SMBUS_BYTE_DATA)
510514
return 0;
511515

0 commit comments

Comments
 (0)