mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
From Andi:
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. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmXRqNMACgkQFA3kzBSg KbYUWQ//Sr7HJZgAiD2jtztEBmhIBiCYlDZQkxyb97JWmOxECfhZO1zXPX4/SLHW q4YS93Z2aB0p0ZAlMC+/cOT6nsSWdg1s77srS4tWRsXtxVOySFu8fWcpOsquUKDT cjmvqAue6nybLRYRFVEPUnTD715Di0EEw75hZ2gL+arDD16aVfWp3gUgXZCGrNxT 4ux0dh6hGQnaP4v7jhi9TkTp4pUUVFNr0nmBLwoyxYTxTAqrYdzpKD4mqB3+upJn B7qL+FeBdXnvQHDz39b1ryOXU0rP3DcwI/ulZ0mbK2dnLzQlZvLF+KsgnprI+iEk AXrrsEWFubmg3FC8bIweX/LZslrHsF0YLC2sRp7QOvvjvZV2/FBi4XcIXWhOIo7l ozVZFdf1t60XoXNq1ZZ+a2Vsh62Ucxhe3u8stQ8i4pcFgPaQ+r0n2DJQmHGpnrOk xxecm4KMMM5/4/pvFqXfJ4nVad7/upUg4p+pNzrPFX8hQaT/NiLK5bV6bNG1pE3v yOgKHX4DpDZwIDCKpeQENJ90nhRc5ohcSbI/YANyGZ3T8XRt32gsJyPQUh5KeLOG qigoOlkYVbyqEtgL3ZBwXRVvVXEXfaSLrNOeQKfxRNq10i7iSoO5Yjrgzyg/JyLc xiK/zJccoz4MlypUqNUpc8uR8nTCVJbDNnIaxExyQ3b8FQiAfCM= =yLmA -----END PGP SIGNATURE----- Merge tag 'i2c-for-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 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
This commit is contained in:
commit
626721edee
@ -90,10 +90,8 @@ obj-$(CONFIG_I2C_NPCM) += i2c-npcm7xx.o
|
||||
obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o
|
||||
obj-$(CONFIG_I2C_OMAP) += i2c-omap.o
|
||||
obj-$(CONFIG_I2C_OWL) += i2c-owl.o
|
||||
i2c-pasemi-objs := i2c-pasemi-core.o i2c-pasemi-pci.o
|
||||
obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi.o
|
||||
i2c-apple-objs := i2c-pasemi-core.o i2c-pasemi-platform.o
|
||||
obj-$(CONFIG_I2C_APPLE) += i2c-apple.o
|
||||
obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi-core.o i2c-pasemi-pci.o
|
||||
obj-$(CONFIG_I2C_APPLE) += i2c-pasemi-core.o i2c-pasemi-platform.o
|
||||
obj-$(CONFIG_I2C_PCA_PLATFORM) += i2c-pca-platform.o
|
||||
obj-$(CONFIG_I2C_PNX) += i2c-pnx.o
|
||||
obj-$(CONFIG_I2C_PXA) += i2c-pxa.o
|
||||
|
@ -498,11 +498,10 @@ static int i801_block_transaction_by_block(struct i801_priv *priv,
|
||||
/* Set block buffer mode */
|
||||
outb_p(inb_p(SMBAUXCTL(priv)) | SMBAUXCTL_E32B, SMBAUXCTL(priv));
|
||||
|
||||
inb_p(SMBHSTCNT(priv)); /* reset the data buffer index */
|
||||
|
||||
if (read_write == I2C_SMBUS_WRITE) {
|
||||
len = data->block[0];
|
||||
outb_p(len, SMBHSTDAT0(priv));
|
||||
inb_p(SMBHSTCNT(priv)); /* reset the data buffer index */
|
||||
for (i = 0; i < len; i++)
|
||||
outb_p(data->block[i+1], SMBBLKDAT(priv));
|
||||
}
|
||||
@ -520,6 +519,7 @@ static int i801_block_transaction_by_block(struct i801_priv *priv,
|
||||
}
|
||||
|
||||
data->block[0] = len;
|
||||
inb_p(SMBHSTCNT(priv)); /* reset the data buffer index */
|
||||
for (i = 0; i < len; i++)
|
||||
data->block[i + 1] = inb_p(SMBBLKDAT(priv));
|
||||
}
|
||||
|
@ -369,6 +369,7 @@ int pasemi_i2c_common_probe(struct pasemi_smbus *smbus)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pasemi_i2c_common_probe);
|
||||
|
||||
irqreturn_t pasemi_irq_handler(int irq, void *dev_id)
|
||||
{
|
||||
@ -378,3 +379,8 @@ irqreturn_t pasemi_irq_handler(int irq, void *dev_id)
|
||||
complete(&smbus->irq_completion);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pasemi_irq_handler);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Olof Johansson <olof@lixom.net>");
|
||||
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
|
||||
|
||||
peripheral.addr = msgs[i].addr;
|
||||
|
||||
if (msgs[i].flags & I2C_M_RD) {
|
||||
ret = geni_i2c_gpi(gi2c, &msgs[i], &config,
|
||||
&rx_addr, &rx_buf, I2C_READ, gi2c->rx_c);
|
||||
if (ret)
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = geni_i2c_gpi(gi2c, &msgs[i], &config,
|
||||
&tx_addr, &tx_buf, I2C_WRITE, gi2c->tx_c);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
if (msgs[i].flags & I2C_M_RD)
|
||||
if (msgs[i].flags & I2C_M_RD) {
|
||||
ret = geni_i2c_gpi(gi2c, &msgs[i], &config,
|
||||
&rx_addr, &rx_buf, I2C_READ, gi2c->rx_c);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
dma_async_issue_pending(gi2c->rx_c);
|
||||
}
|
||||
|
||||
dma_async_issue_pending(gi2c->tx_c);
|
||||
|
||||
timeout = wait_for_completion_timeout(&gi2c->done, XFER_TIMEOUT);
|
||||
|
Loading…
Reference in New Issue
Block a user