linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grzegorz Jaszczyk <jaz@semihalf.com>
To: wsa@the-dreams.de, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	thomas.petazzoni@free-electrons.com,
	gregory.clement@free-electrons.com
Cc: mw@semihalf.com, jaz@semihalf.com, alior@marvell.com
Subject: [PATCH] i2c: i2c-mv64xxx: add suspend/resume support
Date: Thu, 21 Jul 2016 12:39:33 +0200	[thread overview]
Message-ID: <1469097573-17638-1-git-send-email-jaz@semihalf.com> (raw)

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

             reply	other threads:[~2016-07-21 10:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 10:39 Grzegorz Jaszczyk [this message]
2016-08-11  8:39 ` [PATCH] i2c: i2c-mv64xxx: add suspend/resume support Grzegorz Jaszczyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1469097573-17638-1-git-send-email-jaz@semihalf.com \
    --to=jaz@semihalf.com \
    --cc=alior@marvell.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mw@semihalf.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).