Skip to contentSkip to conversation

i2c: i801: Exclude device from suspend direct complete optimization

PATCH Applied Jean Delvare 2 participants 2 messages Sep 10, 2020 – Sep 21, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: i801: Exclude device from suspend direct complete optimization

By default, PCI drivers with runtime PM enabled will skip the calls to suspend and resume on system PM. For this driver, we don't want that, as we need to perform additional steps for system PM to work properly on all systems. So instruct the PM core to not skip these calls.

Fixes a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM")
---
 drivers/i2c/busses/i2c-i801.c |    1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-i801.c +1 -0
@@ -1917,6 +1917,7 @@ static int i801_probe(struct pci_dev *de
 
 	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);
Signature · 2 lines
Jean Delvare
SUSE L3 Support
Applied
#1 lore raw
Quoted 10 lines · Jean Delvare

By default, PCI drivers with runtime PM enabled will skip the calls to suspend and resume on system PM. For this driver, we don't want that, as we need to perform additional steps for system PM to work properly on all systems. So instruct the PM core to not skip these calls.

Fixes a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM")

Applied to for-current, thanks!