Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+8 -2
+2 -1
Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
··· 26 26 - const: realtek,rtl9301-i2c 27 27 28 28 reg: 29 - description: Register offset and size this I2C controller. 29 + items: 30 + - description: Register offset and size this I2C controller. 30 31 31 32 "#address-cells": 32 33 const: 1
+1
drivers/i2c/busses/i2c-designware-master.c
··· 363 363 364 364 dev->msgs = msgs; 365 365 dev->msgs_num = num_msgs; 366 + dev->msg_write_idx = 0; 366 367 i2c_dw_xfer_init(dev); 367 368 368 369 /* Initiate messages read/write transaction */
+5 -1
drivers/i2c/busses/i2c-microchip-corei2c.c
··· 435 435 u8 tx_buf[I2C_SMBUS_BLOCK_MAX + 2]; 436 436 u8 rx_buf[I2C_SMBUS_BLOCK_MAX + 1]; 437 437 int num_msgs = 1; 438 + int ret; 438 439 439 440 msgs[CORE_I2C_SMBUS_MSG_WR].addr = addr; 440 441 msgs[CORE_I2C_SMBUS_MSG_WR].flags = 0; ··· 506 505 return -EOPNOTSUPP; 507 506 } 508 507 509 - mchp_corei2c_xfer(&idev->adapter, msgs, num_msgs); 508 + ret = mchp_corei2c_xfer(&idev->adapter, msgs, num_msgs); 509 + if (ret < 0) 510 + return ret; 511 + 510 512 if (read_write == I2C_SMBUS_WRITE || size <= I2C_SMBUS_BYTE_DATA) 511 513 return 0; 512 514