diff mbox series

[OEM,2/2] Revert "PM: i2c-designware-platdrv: Use DPM_FLAG_SMART_PREPARE"

Message ID 20190102020252.32083-3-jesse.sung@canonical.com
State Accepted
Headers show
Series None | expand

Commit Message

Wen-chien Jesse Sung Jan. 2, 2019, 2:02 a.m. UTC
BugLink: https://launchpad.net/bugs/1810223

This reverts commit 489cd2fafa2d263a6a895f1445e5a8975f18b991.

This commit makes i2c-designware stops working after S4 on CHT.

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
 drivers/i2c/busses/i2c-designware-platdrv.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 4f90a6dc186f..58add69a441c 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -372,8 +372,6 @@  static int dw_i2c_plat_probe(struct platform_device *pdev)
 	ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev));
 	adap->dev.of_node = pdev->dev.of_node;
 
-	dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_SMART_PREPARE);
-
 	/* The code below assumes runtime PM to be disabled. */
 	WARN_ON(pm_runtime_enabled(&pdev->dev));
 
@@ -437,13 +435,7 @@  MODULE_DEVICE_TABLE(of, dw_i2c_of_match);
 #ifdef CONFIG_PM_SLEEP
 static int dw_i2c_plat_prepare(struct device *dev)
 {
-	/*
-	 * If the ACPI companion device object is present for this device, it
-	 * may be accessed during suspend and resume of other devices via I2C
-	 * operation regions, so tell the PM core and middle layers to avoid
-	 * skipping system suspend/resume callbacks for it in that case.
-	 */
-	return !has_acpi_companion(dev);
+	return pm_runtime_suspended(dev);
 }
 
 static void dw_i2c_plat_complete(struct device *dev)