linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: i2c-mv64xxx: add suspend/resume support
@ 2016-07-21 10:39 Grzegorz Jaszczyk
  2016-08-11  8:39 ` Grzegorz Jaszczyk
  0 siblings, 1 reply; 2+ messages in thread
From: Grzegorz Jaszczyk @ 2016-07-21 10:39 UTC (permalink / raw)
  To: wsa, linux-i2c, linux-kernel, thomas.petazzoni, gregory.clement
  Cc: mw, jaz, alior

There is no need to implement subroutine for suspend since there is no
data to store before suspending.

Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
---
 drivers/i2c/busses/i2c-mv64xxx.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index b4dec08..dc048e7 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -977,12 +977,24 @@ mv64xxx_i2c_remove(struct platform_device *dev)
 	return 0;
 }
 
+static int mv64xxx_i2c_resume(struct device *dev)
+{
+	struct mv64xxx_i2c_data *drv_data = dev_get_drvdata(dev);
+
+	mv64xxx_i2c_hw_init(drv_data);
+
+	return 0;
+}
+
+static SIMPLE_DEV_PM_OPS(mv64xxx_i2c_pm_ops, NULL, mv64xxx_i2c_resume);
+
 static struct platform_driver mv64xxx_i2c_driver = {
 	.probe	= mv64xxx_i2c_probe,
 	.remove	= mv64xxx_i2c_remove,
 	.driver	= {
 		.name	= MV64XXX_I2C_CTLR_NAME,
 		.of_match_table = mv64xxx_i2c_of_match_table,
+		.pm = &mv64xxx_i2c_pm_ops,
 	},
 };
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-11  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-21 10:39 [PATCH] i2c: i2c-mv64xxx: add suspend/resume support Grzegorz Jaszczyk
2016-08-11  8:39 ` Grzegorz Jaszczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).