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

Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
"A bunch of driver bugfixes and a MAINTAINERS addition"

* 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
MAINTAINERS: add entry for STM32 I2C driver
i2c: viperboard: return message count on master_xfer success
i2c: pmcmsp: fix error return from master_xfer
i2c: pmcmsp: return message count on master_xfer success
i2c: designware: fix poll-after-enable regression
eeprom: at24: fix retrieving the at24_chip_data structure
i2c: core: ACPI: Log device not acking errors at dbg loglevel
i2c: core: ACPI: Improve OpRegion read errors

+24 -8
+6
MAINTAINERS
··· 13264 13264 S: Maintained 13265 13265 F: arch/alpha/kernel/srm_env.c 13266 13266 13267 + ST STM32 I2C/SMBUS DRIVER 13268 + M: Pierre-Yves MORDRET <pierre-yves.mordret@st.com> 13269 + L: linux-i2c@vger.kernel.org 13270 + S: Maintained 13271 + F: drivers/i2c/busses/i2c-stm32* 13272 + 13267 13273 STABLE BRANCH 13268 13274 M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 13269 13275 L: stable@vger.kernel.org
+4 -1
drivers/i2c/busses/i2c-designware-master.c
··· 209 209 i2c_dw_disable_int(dev); 210 210 211 211 /* Enable the adapter */ 212 - __i2c_dw_enable_and_wait(dev, true); 212 + __i2c_dw_enable(dev, true); 213 + 214 + /* Dummy read to avoid the register getting stuck on Bay Trail */ 215 + dw_readl(dev, DW_IC_ENABLE_STATUS); 213 216 214 217 /* Clear and enable interrupts */ 215 218 dw_readl(dev, DW_IC_CLR_INTR);
+2 -2
drivers/i2c/busses/i2c-pmcmsp.c
··· 564 564 * TODO: We could potentially loop and retry in the case 565 565 * of MSP_TWI_XFER_TIMEOUT. 566 566 */ 567 - return -1; 567 + return -EIO; 568 568 } 569 569 570 - return 0; 570 + return num; 571 571 } 572 572 573 573 static u32 pmcmsptwi_i2c_func(struct i2c_adapter *adapter)
+1 -1
drivers/i2c/busses/i2c-viperboard.c
··· 337 337 } 338 338 mutex_unlock(&vb->lock); 339 339 } 340 - return 0; 340 + return num; 341 341 error: 342 342 mutex_unlock(&vb->lock); 343 343 return error;
+10 -3
drivers/i2c/i2c-core-acpi.c
··· 445 445 msgs[1].buf = buffer; 446 446 447 447 ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); 448 - if (ret < 0) 449 - dev_err(&client->adapter->dev, "i2c read failed\n"); 450 - else 448 + if (ret < 0) { 449 + /* Getting a NACK is unfortunately normal with some DSTDs */ 450 + if (ret == -EREMOTEIO) 451 + dev_dbg(&client->adapter->dev, "i2c read %d bytes from client@%#x starting at reg %#x failed, error: %d\n", 452 + data_len, client->addr, cmd, ret); 453 + else 454 + dev_err(&client->adapter->dev, "i2c read %d bytes from client@%#x starting at reg %#x failed, error: %d\n", 455 + data_len, client->addr, cmd, ret); 456 + } else { 451 457 memcpy(data, buffer, data_len); 458 + } 452 459 453 460 kfree(buffer); 454 461 return ret;
+1 -1
drivers/misc/eeprom/at24.c
··· 518 518 if (of_node && of_match_device(at24_of_match, dev)) 519 519 cdata = of_device_get_match_data(dev); 520 520 else if (id) 521 - cdata = (void *)&id->driver_data; 521 + cdata = (void *)id->driver_data; 522 522 else 523 523 cdata = acpi_device_get_match_data(dev); 524 524