i2c: designware: Uncomment and recover the pm functions
authorHal Feng <hal.feng@starfivetech.com>
Tue, 25 Oct 2022 12:18:39 +0000 (20:18 +0800)
committermason.huo <mason.huo@starfivetech.com>
Thu, 27 Oct 2022 06:00:49 +0000 (14:00 +0800)
Uncomment the system pm and runtime pm ops functions. Restore
the Synopsys DesignWare i2c driver to the original version.

Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
drivers/i2c/busses/i2c-designware-platdrv.c

index 50de0bd..2111366 100755 (executable)
@@ -366,7 +366,6 @@ static void dw_i2c_plat_complete(struct device *dev)
 #endif
 
 #ifdef CONFIG_PM
-/*
 static int dw_i2c_plat_suspend(struct device *dev)
 {
        struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
@@ -401,10 +400,8 @@ static const struct dev_pm_ops dw_i2c_dev_pm_ops = {
        SET_LATE_SYSTEM_SLEEP_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume)
        SET_RUNTIME_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume, NULL)
 };
-*/
 
-//#define DW_I2C_DEV_PMOPS (&dw_i2c_dev_pm_ops)
-#define DW_I2C_DEV_PMOPS NULL
+#define DW_I2C_DEV_PMOPS (&dw_i2c_dev_pm_ops)
 #else
 #define DW_I2C_DEV_PMOPS NULL
 #endif