diff mbox series

i2c: i801: Exclude device from suspend direct complete optimization

Message ID 20200910115708.263c8e02@endymion
State Accepted
Commit 845b89127bc5458d0152a4d63f165c62a22fcb70
Headers show
Series i2c: i801: Exclude device from suspend direct complete optimization | expand

Commit Message

Jean Delvare Sept. 10, 2020, 9:57 a.m. UTC
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")
Reported-by: Volker RĂ¼melin <volker.ruemelin@googlemail.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: stable@vger.kernel.org
---
 drivers/i2c/busses/i2c-i801.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Wolfram Sang Sept. 21, 2020, 9:30 a.m. UTC | #1
On Thu, Sep 10, 2020 at 11:57:08AM +0200, Jean Delvare wrote:
> 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")

> Reported-by: Volker RĂ¼melin <volker.ruemelin@googlemail.com>

> Signed-off-by: Jean Delvare <jdelvare@suse.de>

> Cc: stable@vger.kernel.org


Applied to for-current, thanks!
diff mbox series

Patch

--- linux-5.8.orig/drivers/i2c/busses/i2c-i801.c	2020-09-09 18:41:55.118961045 +0200
+++ linux-5.8/drivers/i2c/busses/i2c-i801.c	2020-09-10 11:36:40.352858458 +0200
@@ -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);