From: Jean Delvare Date: Thu, 10 Sep 2020 09:57:08 +0000 (+0200) Subject: i2c: i801: Exclude device from suspend direct complete optimization X-Git-Tag: v5.10.7~1551^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=845b89127bc5458d0152a4d63f165c62a22fcb70;p=platform%2Fkernel%2Flinux-rpi.git 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") Reported-by: Volker RĂ¼melin Signed-off-by: Jean Delvare Cc: stable@vger.kernel.org Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index ebb4c0b..bffca729 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -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);