Skip to content

Commit 67ec505

Browse files
committed
Merge tag 'i2c-host-fixes-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current
Three fixes are included here. Two are strictly hardware-related for the i801 and qcom-geni devices. Meanwhile, a fix from Arnd addresses a compilation error encountered during compile test on powerpc.
2 parents 841c351 + c1c9d0f commit 67ec505

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

drivers/i2c/busses/Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,8 @@ obj-$(CONFIG_I2C_NPCM) += i2c-npcm7xx.o
9090
obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o
9191
obj-$(CONFIG_I2C_OMAP) += i2c-omap.o
9292
obj-$(CONFIG_I2C_OWL) += i2c-owl.o
93-
i2c-pasemi-objs := i2c-pasemi-core.o i2c-pasemi-pci.o
94-
obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi.o
95-
i2c-apple-objs := i2c-pasemi-core.o i2c-pasemi-platform.o
96-
obj-$(CONFIG_I2C_APPLE) += i2c-apple.o
93+
obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi-core.o i2c-pasemi-pci.o
94+
obj-$(CONFIG_I2C_APPLE) += i2c-pasemi-core.o i2c-pasemi-platform.o
9795
obj-$(CONFIG_I2C_PCA_PLATFORM) += i2c-pca-platform.o
9896
obj-$(CONFIG_I2C_PNX) += i2c-pnx.o
9997
obj-$(CONFIG_I2C_PXA) += i2c-pxa.o

drivers/i2c/busses/i2c-i801.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,11 +498,10 @@ static int i801_block_transaction_by_block(struct i801_priv *priv,
498498
/* Set block buffer mode */
499499
outb_p(inb_p(SMBAUXCTL(priv)) | SMBAUXCTL_E32B, SMBAUXCTL(priv));
500500

501-
inb_p(SMBHSTCNT(priv)); /* reset the data buffer index */
502-
503501
if (read_write == I2C_SMBUS_WRITE) {
504502
len = data->block[0];
505503
outb_p(len, SMBHSTDAT0(priv));
504+
inb_p(SMBHSTCNT(priv)); /* reset the data buffer index */
506505
for (i = 0; i < len; i++)
507506
outb_p(data->block[i+1], SMBBLKDAT(priv));
508507
}
@@ -520,6 +519,7 @@ static int i801_block_transaction_by_block(struct i801_priv *priv,
520519
}
521520

522521
data->block[0] = len;
522+
inb_p(SMBHSTCNT(priv)); /* reset the data buffer index */
523523
for (i = 0; i < len; i++)
524524
data->block[i + 1] = inb_p(SMBBLKDAT(priv));
525525
}

drivers/i2c/busses/i2c-pasemi-core.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ int pasemi_i2c_common_probe(struct pasemi_smbus *smbus)
369369

370370
return 0;
371371
}
372+
EXPORT_SYMBOL_GPL(pasemi_i2c_common_probe);
372373

373374
irqreturn_t pasemi_irq_handler(int irq, void *dev_id)
374375
{
@@ -378,3 +379,8 @@ irqreturn_t pasemi_irq_handler(int irq, void *dev_id)
378379
complete(&smbus->irq_completion);
379380
return IRQ_HANDLED;
380381
}
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");

drivers/i2c/busses/i2c-qcom-geni.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -613,20 +613,20 @@ static int geni_i2c_gpi_xfer(struct geni_i2c_dev *gi2c, struct i2c_msg msgs[], i
613613

614614
peripheral.addr = msgs[i].addr;
615615

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+
616621
if (msgs[i].flags & I2C_M_RD) {
617622
ret = geni_i2c_gpi(gi2c, &msgs[i], &config,
618623
&rx_addr, &rx_buf, I2C_READ, gi2c->rx_c);
619624
if (ret)
620625
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;
627626

628-
if (msgs[i].flags & I2C_M_RD)
629627
dma_async_issue_pending(gi2c->rx_c);
628+
}
629+
630630
dma_async_issue_pending(gi2c->tx_c);
631631

632632
timeout = wait_for_completion_timeout(&gi2c->done, XFER_TIMEOUT);

0 commit comments

Comments
 (0)