aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-mt65xx.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2016-01-11 17:47:25 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2016-01-11 17:47:25 -0800
commit009f773836513960d3982e80c86e266d25528563 (patch)
tree7315e5666698997dee34a80c1a1db801d3f8879b /drivers/i2c/busses/i2c-mt65xx.c
parentInput: i8042 - add Fujitsu Lifebook U745 to the nomux list (diff)
parentInput: elantech - mark protocols v2 and v3 as semi-mt (diff)
downloadlinux-dev-009f773836513960d3982e80c86e266d25528563.tar.xz
linux-dev-009f773836513960d3982e80c86e266d25528563.zip
Merge branch 'next' into for-linus
Prepare first round of input updates for 4.5 merge window.
Diffstat (limited to 'drivers/i2c/busses/i2c-mt65xx.c')
-rw-r--r--drivers/i2c/busses/i2c-mt65xx.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
index c02e6c018c39..9b867169142f 100644
--- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -728,11 +728,27 @@ static int mtk_i2c_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_PM_SLEEP
+static int mtk_i2c_resume(struct device *dev)
+{
+ struct mtk_i2c *i2c = dev_get_drvdata(dev);
+
+ mtk_i2c_init_hw(i2c);
+
+ return 0;
+}
+#endif
+
+static const struct dev_pm_ops mtk_i2c_pm = {
+ SET_SYSTEM_SLEEP_PM_OPS(NULL, mtk_i2c_resume)
+};
+
static struct platform_driver mtk_i2c_driver = {
.probe = mtk_i2c_probe,
.remove = mtk_i2c_remove,
.driver = {
.name = I2C_DRV_NAME,
+ .pm = &mtk_i2c_pm,
.of_match_table = of_match_ptr(mtk_i2c_of_match),
},
};