mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 13:34:10 +08:00
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang: "Some more driver fixes for i2c" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: npcm7xx: Clear LAST bit after a failed transaction. i2c: cpm: Fix i2c_ram structure i2c: i801: Exclude device from suspend direct complete optimization
This commit is contained in:
commit
f35c08e0bb
@ -65,6 +65,9 @@ struct i2c_ram {
|
||||
char res1[4]; /* Reserved */
|
||||
ushort rpbase; /* Relocation pointer */
|
||||
char res2[2]; /* Reserved */
|
||||
/* The following elements are only for CPM2 */
|
||||
char res3[4]; /* Reserved */
|
||||
uint sdmatmp; /* Internal */
|
||||
};
|
||||
|
||||
#define I2COM_START 0x80
|
||||
|
@ -1917,6 +1917,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
|
||||
pci_set_drvdata(dev, priv);
|
||||
|
||||
dev_pm_set_driver_flags(&dev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
|
||||
pm_runtime_set_autosuspend_delay(&dev->dev, 1000);
|
||||
pm_runtime_use_autosuspend(&dev->dev);
|
||||
pm_runtime_put_autosuspend(&dev->dev);
|
||||
|
@ -2163,6 +2163,15 @@ static int npcm_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
|
||||
if (bus->cmd_err == -EAGAIN)
|
||||
ret = i2c_recover_bus(adap);
|
||||
|
||||
/*
|
||||
* After any type of error, check if LAST bit is still set,
|
||||
* due to a HW issue.
|
||||
* It cannot be cleared without resetting the module.
|
||||
*/
|
||||
if (bus->cmd_err &&
|
||||
(NPCM_I2CRXF_CTL_LAST_PEC & ioread8(bus->reg + NPCM_I2CRXF_CTL)))
|
||||
npcm_i2c_reset(bus);
|
||||
|
||||
#if IS_ENABLED(CONFIG_I2C_SLAVE)
|
||||
/* reenable slave if it was enabled */
|
||||
if (bus->slave)
|
||||
|
Loading…
Reference in New Issue
Block a user