i2c: designware: Enable async suspend / resume of designware devices
authorRajat Jain <rajatja@google.com>
Mon, 25 Oct 2021 21:35:29 +0000 (14:35 -0700)
committerWolfram Sang <wsa@kernel.org>
Mon, 29 Nov 2021 16:50:33 +0000 (17:50 +0100)
Mark the designware devices for asynchronous suspend. With this, the
resume for designware devices does not get stuck behind other unrelated
devices (e.g. intel_backlight that takes hundreds of ms to resume,
waiting for its parent devices).

Signed-off-by: Rajat Jain <rajatja@google.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-designware-platdrv.c

index 2111366..2bd81ab 100644 (file)
@@ -293,6 +293,8 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
                                        DPM_FLAG_MAY_SKIP_RESUME);
        }
 
+       device_enable_async_suspend(&pdev->dev);
+
        /* The code below assumes runtime PM to be disabled. */
        WARN_ON(pm_runtime_enabled(&pdev->dev));