Pull i2c fixes from Wolfram Sang: "Two fixes for i801 and qcom-geni devices. Meanwhile, a fix from Arnd addresses a compilation error encountered during compile test on powerpc" * tag 'i2c-for-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: i801: Fix block process call transactions i2c: pasemi: split driver into two separate modules i2c: qcom-geni: Correct I2C TRE sequence
Unified · Split
| @@ -90,10 +90,8 @@ obj-$(CONFIG_I2C_NPCM) += i2c-npcm7xx.o · 89 unmodified lines | |||
| 90 | obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o | 90 | obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o |
| 91 | obj-$(CONFIG_I2C_OMAP) += i2c-omap.o | 91 | obj-$(CONFIG_I2C_OMAP) += i2c-omap.o |
| 92 | obj-$(CONFIG_I2C_OWL) += i2c-owl.o | 92 | obj-$(CONFIG_I2C_OWL) += i2c-owl.o |
| 93 | i2c-pasemi-objs := i2c-pasemi-core.o i2c-pasemi-pci.o | 93 | obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi-core.o i2c-pasemi-pci.o |
| 94 | obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi.o | 94 | obj-$(CONFIG_I2C_APPLE) += i2c-pasemi-core.o i2c-pasemi-platform.o |
| 95 | i2c-apple-objs := i2c-pasemi-core.o i2c-pasemi-platform.o | ||
| 96 | obj-$(CONFIG_I2C_APPLE) += i2c-apple.o | ||
| 97 | obj-$(CONFIG_I2C_PCA_PLATFORM) += i2c-pca-platform.o | 95 | obj-$(CONFIG_I2C_PCA_PLATFORM) += i2c-pca-platform.o |
| 98 | obj-$(CONFIG_I2C_PNX) += i2c-pnx.o | 96 | obj-$(CONFIG_I2C_PNX) += i2c-pnx.o |
| 99 | obj-$(CONFIG_I2C_PXA) += i2c-pxa.o | 97 | obj-$(CONFIG_I2C_PXA) += i2c-pxa.o |
| @@ -498,11 +498,10 @@ static int i801_block_transaction_by_block(struct i801_priv *priv, · 497 unmodified lines | |||
| 498 | /* Set block buffer mode */ | 498 | /* Set block buffer mode */ |
| 499 | outb_p(inb_p(SMBAUXCTL(priv)) | SMBAUXCTL_E32B, SMBAUXCTL(priv)); | 499 | outb_p(inb_p(SMBAUXCTL(priv)) | SMBAUXCTL_E32B, SMBAUXCTL(priv)); |
| 500 | 500 | ||
| 501 | inb_p(SMBHSTCNT(priv)); /* reset the data buffer index */ | ||
| 502 | |||
| 503 | if (read_write == I2C_SMBUS_WRITE) { | 501 | if (read_write == I2C_SMBUS_WRITE) { |
| 504 | len = data->block[0]; | 502 | len = data->block[0]; |
| 505 | outb_p(len, SMBHSTDAT0(priv)); | 503 | outb_p(len, SMBHSTDAT0(priv)); |
| 504 | inb_p(SMBHSTCNT(priv)); /* reset the data buffer index */ | ||
| 506 | for (i = 0; i < len; i++) | 505 | for (i = 0; i < len; i++) |
| 507 | outb_p(data->block[i+1], SMBBLKDAT(priv)); | 506 | outb_p(data->block[i+1], SMBBLKDAT(priv)); |
| 508 | } | 507 | } |
| @@ -520,6 +519,7 @@ static int i801_block_transaction_by_block(struct i801_priv *priv, · 11 unmodified lines | |||
| 520 | } | 519 | } |
| 521 | 520 | ||
| 522 | data->block[0] = len; | 521 | data->block[0] = len; |
| 522 | inb_p(SMBHSTCNT(priv)); /* reset the data buffer index */ | ||
| 523 | for (i = 0; i < len; i++) | 523 | for (i = 0; i < len; i++) |
| 524 | data->block[i + 1] = inb_p(SMBBLKDAT(priv)); | 524 | data->block[i + 1] = inb_p(SMBBLKDAT(priv)); |
| 525 | } | 525 | } |
| @@ -369,6 +369,7 @@ int pasemi_i2c_common_probe(struct pasemi_smbus *smbus) · 368 unmodified lines | |||
| 369 | 369 | ||
| 370 | return 0; | 370 | return 0; |
| 371 | } | 371 | } |
| 372 | EXPORT_SYMBOL_GPL(pasemi_i2c_common_probe); | ||
| 372 | 373 | ||
| 373 | irqreturn_t pasemi_irq_handler(int irq, void *dev_id) | 374 | irqreturn_t pasemi_irq_handler(int irq, void *dev_id) |
| 374 | { | 375 | { |
| @@ -378,3 +379,8 @@ irqreturn_t pasemi_irq_handler(int irq, void *dev_id) · 3 unmodified lines | |||
| 378 | complete(&smbus->irq_completion); | 379 | complete(&smbus->irq_completion); |
| 379 | return IRQ_HANDLED; | 380 | return IRQ_HANDLED; |
| 380 | } | 381 | } |
| 382 | EXPORT_SYMBOL_GPL(pasemi_irq_handler); | ||
| 383 | |||
| 384 | MODULE_LICENSE("GPL"); | ||
| 385 | MODULE_AUTHOR("Olof Johansson <olof@lixom.net>"); | ||
| 386 | MODULE_DESCRIPTION("PA Semi PWRficient SMBus driver"); | ||
| @@ -613,20 +613,20 @@ static int geni_i2c_gpi_xfer(struct geni_i2c_dev *gi2c, struct i2c_msg msgs[], i · 612 unmodified lines | |||
| 613 | 613 | ||
| 614 | peripheral.addr = msgs[i].addr; | 614 | peripheral.addr = msgs[i].addr; |
| 615 | 615 | ||
| 616 | ret = geni_i2c_gpi(gi2c, &msgs[i], &config, | ||
| 617 | &tx_addr, &tx_buf, I2C_WRITE, gi2c->tx_c); | ||
| 618 | if (ret) | ||
| 619 | goto err; | ||
| 620 | |||
| 616 | if (msgs[i].flags & I2C_M_RD) { | 621 | if (msgs[i].flags & I2C_M_RD) { |
| 617 | ret = geni_i2c_gpi(gi2c, &msgs[i], &config, | 622 | ret = geni_i2c_gpi(gi2c, &msgs[i], &config, |
| 618 | &rx_addr, &rx_buf, I2C_READ, gi2c->rx_c); | 623 | &rx_addr, &rx_buf, I2C_READ, gi2c->rx_c); |
| 619 | if (ret) | 624 | if (ret) |
| 620 | goto err; | 625 | goto err; |
| 621 | } | ||
| 622 | |||
| 623 | ret = geni_i2c_gpi(gi2c, &msgs[i], &config, | ||
| 624 | &tx_addr, &tx_buf, I2C_WRITE, gi2c->tx_c); | ||
| 625 | if (ret) | ||
| 626 | goto err; | ||
| 627 | 626 | ||
| 628 | if (msgs[i].flags & I2C_M_RD) | ||
| 629 | dma_async_issue_pending(gi2c->rx_c); | 627 | dma_async_issue_pending(gi2c->rx_c); |
| 628 | } | ||
| 629 | |||
| 630 | dma_async_issue_pending(gi2c->tx_c); | 630 | dma_async_issue_pending(gi2c->tx_c); |
| 631 | 631 | ||
| 632 | timeout = wait_for_completion_timeout(&gi2c->done, XFER_TIMEOUT); | 632 | timeout = wait_for_completion_timeout(&gi2c->done, XFER_TIMEOUT); |