Merge tag 'i2c-for-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
[sfrench/cifs-2.6.git] / drivers / i2c / busses / i2c-designware-platdrv.c
index ba043b5473936b67f135b0d34c24efa2518cc12e..74182db03a88b36946b6f897e5de1db62c32b222 100644 (file)
@@ -351,13 +351,11 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
 
        if (dev->flags & ACCESS_NO_IRQ_SUSPEND) {
                dev_pm_set_driver_flags(&pdev->dev,
-                                       DPM_FLAG_SMART_PREPARE |
-                                       DPM_FLAG_MAY_SKIP_RESUME);
+                                       DPM_FLAG_SMART_PREPARE);
        } else {
                dev_pm_set_driver_flags(&pdev->dev,
                                        DPM_FLAG_SMART_PREPARE |
-                                       DPM_FLAG_SMART_SUSPEND |
-                                       DPM_FLAG_MAY_SKIP_RESUME);
+                                       DPM_FLAG_SMART_SUSPEND);
        }
 
        device_enable_async_suspend(&pdev->dev);
@@ -419,21 +417,8 @@ static int dw_i2c_plat_prepare(struct device *dev)
         */
        return !has_acpi_companion(dev);
 }
-
-static void dw_i2c_plat_complete(struct device *dev)
-{
-       /*
-        * The device can only be in runtime suspend at this point if it has not
-        * been resumed throughout the ending system suspend/resume cycle, so if
-        * the platform firmware might mess up with it, request the runtime PM
-        * framework to resume it.
-        */
-       if (pm_runtime_suspended(dev) && pm_resume_via_firmware())
-               pm_request_resume(dev);
-}
 #else
 #define dw_i2c_plat_prepare    NULL
-#define dw_i2c_plat_complete   NULL
 #endif
 
 #ifdef CONFIG_PM
@@ -483,7 +468,6 @@ static int __maybe_unused dw_i2c_plat_resume(struct device *dev)
 
 static const struct dev_pm_ops dw_i2c_dev_pm_ops = {
        .prepare = dw_i2c_plat_prepare,
-       .complete = dw_i2c_plat_complete,
        SET_LATE_SYSTEM_SLEEP_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume)
        SET_RUNTIME_PM_OPS(dw_i2c_plat_runtime_suspend, dw_i2c_plat_runtime_resume, NULL)
 };