Skip to content

Commit

Permalink
i2c: designware: Disable device on system suspend
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mika Westerberg authored and Wolfram Sang committed Jun 2, 2014
1 parent 7da62cb commit f537295
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-designware-platdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ static int dw_i2c_suspend(struct device *dev)
struct platform_device *pdev = to_platform_device(dev);
struct dw_i2c_dev *i_dev = platform_get_drvdata(pdev);

i2c_dw_disable(i_dev);
clk_disable_unprepare(i_dev->clk);

return 0;
Expand Down

0 comments on commit f537295

Please sign in to comment.