aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-designware-platdrv.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2014-05-15 10:37:22 -0400
committerWolfram Sang <wsa@the-dreams.de>2014-06-02 13:18:38 -0400
commitf537295a58ddc4460b9857c6e4a6959685447f3b (patch)
tree7c7923999856323560c8900a3327ad3845f90060 /drivers/i2c/busses/i2c-designware-platdrv.c
parent7da62cb1853025a579a8942fc4d7c9dee6afb73e (diff)
i2c: designware: Disable device on system suspend
Userspace can initiate system suspend on arbitrary times which means that device drivers must make sure that their device gets quiesced before system suspend is entered. Therefore disable the I2C host controller in the driver system suspend hook. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-designware-platdrv.c')
-rw-r--r--drivers/i2c/busses/i2c-designware-platdrv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 9c7802614342..f72102f389c5 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -253,6 +253,7 @@ static int dw_i2c_suspend(struct device *dev)
253 struct platform_device *pdev = to_platform_device(dev); 253 struct platform_device *pdev = to_platform_device(dev);
254 struct dw_i2c_dev *i_dev = platform_get_drvdata(pdev); 254 struct dw_i2c_dev *i_dev = platform_get_drvdata(pdev);
255 255
256 i2c_dw_disable(i_dev);
256 clk_disable_unprepare(i_dev->clk); 257 clk_disable_unprepare(i_dev->clk);
257 258
258 return 0; 259 return 0;