diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-05-18 21:02:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-05-18 21:02:01 -0400 |
commit | 6d16db0093936c382f74ed3d076fc7d025671297 (patch) | |
tree | 3d86894f9fe561b8ba545dc6f7b8be4731e5e3b7 | |
parent | 2c71d338bef2cc8a2e5f8ebe70788eeff246fcd8 (diff) | |
parent | 22aac3eb0c465dd9ea7f06ee1ed8ad933890f2a3 (diff) |
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
-rw-r--r-- | MAINTAINERS | 6 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-designware-master.c | 5 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-pmcmsp.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-viperboard.c | 2 | ||||
-rw-r--r-- | drivers/i2c/i2c-core-acpi.c | 13 | ||||
-rw-r--r-- | drivers/misc/eeprom/at24.c | 2 |
6 files changed, 24 insertions, 8 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 92e47b5b0480..4de8a5d9ed91 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -13264,6 +13264,12 @@ M: Jan-Benedict Glaw <jbglaw@lug-owl.de> | |||
13264 | S: Maintained | 13264 | S: Maintained |
13265 | F: arch/alpha/kernel/srm_env.c | 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 | STABLE BRANCH | 13273 | STABLE BRANCH |
13268 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 13274 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
13269 | L: stable@vger.kernel.org | 13275 | L: stable@vger.kernel.org |
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c index fd36c39ddf4e..0cdba29ae0a9 100644 --- a/drivers/i2c/busses/i2c-designware-master.c +++ b/drivers/i2c/busses/i2c-designware-master.c | |||
@@ -209,7 +209,10 @@ static void i2c_dw_xfer_init(struct dw_i2c_dev *dev) | |||
209 | i2c_dw_disable_int(dev); | 209 | i2c_dw_disable_int(dev); |
210 | 210 | ||
211 | /* Enable the adapter */ | 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 | /* Clear and enable interrupts */ | 217 | /* Clear and enable interrupts */ |
215 | dw_readl(dev, DW_IC_CLR_INTR); | 218 | dw_readl(dev, DW_IC_CLR_INTR); |
diff --git a/drivers/i2c/busses/i2c-pmcmsp.c b/drivers/i2c/busses/i2c-pmcmsp.c index 2aa0e83174c5..dae8ac618a52 100644 --- a/drivers/i2c/busses/i2c-pmcmsp.c +++ b/drivers/i2c/busses/i2c-pmcmsp.c | |||
@@ -564,10 +564,10 @@ static int pmcmsptwi_master_xfer(struct i2c_adapter *adap, | |||
564 | * TODO: We could potentially loop and retry in the case | 564 | * TODO: We could potentially loop and retry in the case |
565 | * of MSP_TWI_XFER_TIMEOUT. | 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 | static u32 pmcmsptwi_i2c_func(struct i2c_adapter *adapter) | 573 | static u32 pmcmsptwi_i2c_func(struct i2c_adapter *adapter) |
diff --git a/drivers/i2c/busses/i2c-viperboard.c b/drivers/i2c/busses/i2c-viperboard.c index e4be86b3de9a..7235c7302bb7 100644 --- a/drivers/i2c/busses/i2c-viperboard.c +++ b/drivers/i2c/busses/i2c-viperboard.c | |||
@@ -337,7 +337,7 @@ static int vprbrd_i2c_xfer(struct i2c_adapter *i2c, struct i2c_msg *msgs, | |||
337 | } | 337 | } |
338 | mutex_unlock(&vb->lock); | 338 | mutex_unlock(&vb->lock); |
339 | } | 339 | } |
340 | return 0; | 340 | return num; |
341 | error: | 341 | error: |
342 | mutex_unlock(&vb->lock); | 342 | mutex_unlock(&vb->lock); |
343 | return error; | 343 | return error; |
diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c index a9126b3cda61..7c3b4740b94b 100644 --- a/drivers/i2c/i2c-core-acpi.c +++ b/drivers/i2c/i2c-core-acpi.c | |||
@@ -445,10 +445,17 @@ static int acpi_gsb_i2c_read_bytes(struct i2c_client *client, | |||
445 | msgs[1].buf = buffer; | 445 | msgs[1].buf = buffer; |
446 | 446 | ||
447 | ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); | 447 | ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); |
448 | if (ret < 0) | 448 | if (ret < 0) { |
449 | dev_err(&client->adapter->dev, "i2c read failed\n"); | 449 | /* Getting a NACK is unfortunately normal with some DSTDs */ |
450 | else | 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 | memcpy(data, buffer, data_len); | 457 | memcpy(data, buffer, data_len); |
458 | } | ||
452 | 459 | ||
453 | kfree(buffer); | 460 | kfree(buffer); |
454 | return ret; | 461 | return ret; |
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index 0c125f207aea..33053b0d1fdf 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c | |||
@@ -518,7 +518,7 @@ static int at24_get_pdata(struct device *dev, struct at24_platform_data *pdata) | |||
518 | if (of_node && of_match_device(at24_of_match, dev)) | 518 | if (of_node && of_match_device(at24_of_match, dev)) |
519 | cdata = of_device_get_match_data(dev); | 519 | cdata = of_device_get_match_data(dev); |
520 | else if (id) | 520 | else if (id) |
521 | cdata = (void *)&id->driver_data; | 521 | cdata = (void *)id->driver_data; |
522 | else | 522 | else |
523 | cdata = acpi_device_get_match_data(dev); | 523 | cdata = acpi_device_get_match_data(dev); |
524 | 524 | ||