diff options
author | Wolfram Sang <wsa@kernel.org> | 2020-05-20 15:27:45 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2020-05-20 15:27:45 +0200 |
commit | f89c326dcaa0cb8c3af7764e75eeed4e3f3c879a (patch) | |
tree | 31a5967da1f04180a1a922258f6947ad17255ee8 /drivers/i2c/busses/i2c-designware-platdrv.c | |
parent | i2c: core: support bus regulator controlling in adapter (diff) | |
parent | MAINTAINERS: add maintainer for mediatek i2c controller driver (diff) | |
download | linux-f89c326dcaa0cb8c3af7764e75eeed4e3f3c879a.tar.xz linux-f89c326dcaa0cb8c3af7764e75eeed4e3f3c879a.zip |
Merge branch 'i2c/for-current-fixed' into i2c/for-5.8
Diffstat (limited to 'drivers/i2c/busses/i2c-designware-platdrv.c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-platdrv.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index c6f04449036a..01db634461b6 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -314,10 +314,16 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) adap->dev.of_node = pdev->dev.of_node; adap->nr = -1; - dev_pm_set_driver_flags(&pdev->dev, - DPM_FLAG_SMART_PREPARE | - DPM_FLAG_SMART_SUSPEND | - DPM_FLAG_LEAVE_SUSPENDED); + if (dev->flags & ACCESS_NO_IRQ_SUSPEND) { + dev_pm_set_driver_flags(&pdev->dev, + DPM_FLAG_SMART_PREPARE | + DPM_FLAG_LEAVE_SUSPENDED); + } else { + dev_pm_set_driver_flags(&pdev->dev, + DPM_FLAG_SMART_PREPARE | + DPM_FLAG_SMART_SUSPEND | + DPM_FLAG_LEAVE_SUSPENDED); + } /* The code below assumes runtime PM to be disabled. */ WARN_ON(pm_runtime_enabled(&pdev->dev)); |