From: Thierry Escande <thierry.escande@collabora.com>
To: Benson Leung <bleung@chromium.org>, Lee Jones <lee.jones@linaro.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/8] mfd: cros_ec_i2c: move the system sleep pm ops to late
Date: Fri, 11 Aug 2017 00:16:44 +0200 [thread overview]
Message-ID: <1502403410-5233-3-git-send-email-thierry.escande@collabora.com> (raw)
In-Reply-To: <1502403410-5233-1-git-send-email-thierry.escande@collabora.com>
From: Joseph Lo <josephl@nvidia.com>
The cros_ec_i2c driver is still active after it had suspended or before it
resumes. Besides that, it also tried to transfer data even after the I2C
host had been suspended. This leads the system to crash.
During the test, we also observed that the EC needs to be resumed
earlier due to some status polling from the EC firmware (e.g. battery
status). This patch moves the PM ops to late stage to make it work
normally.
Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
---
drivers/mfd/cros_ec_i2c.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/cros_ec_i2c.c b/drivers/mfd/cros_ec_i2c.c
index 9f70de1..576fcc4 100644
--- a/drivers/mfd/cros_ec_i2c.c
+++ b/drivers/mfd/cros_ec_i2c.c
@@ -341,8 +341,9 @@ static int cros_ec_i2c_resume(struct device *dev)
}
#endif
-static SIMPLE_DEV_PM_OPS(cros_ec_i2c_pm_ops, cros_ec_i2c_suspend,
- cros_ec_i2c_resume);
+const struct dev_pm_ops cros_ec_i2c_pm_ops = {
+ SET_LATE_SYSTEM_SLEEP_PM_OPS(cros_ec_i2c_suspend, cros_ec_i2c_resume)
+};
static const struct of_device_id cros_ec_i2c_of_match[] = {
{ .compatible = "google,cros-ec-i2c", },
--
2.7.4
next prev parent reply other threads:[~2017-08-10 22:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 22:16 [PATCH 0/8] platform/chrome: cros_ec: Fixes and improvements Thierry Escande
2017-08-10 22:16 ` [PATCH 1/8] iio: cros_ec: Relax sampling frequency before suspending Thierry Escande
2017-08-11 3:25 ` Benson Leung
2017-08-12 12:41 ` Jonathan Cameron
2017-08-10 22:16 ` Thierry Escande [this message]
2017-08-11 3:31 ` [PATCH 2/8] mfd: cros_ec_i2c: move the system sleep pm ops to late Benson Leung
2017-08-10 22:16 ` [PATCH 3/8] mfd: cros_ec: Stop the debugfs work when suspended Thierry Escande
2017-08-11 3:54 ` Benson Leung
2017-08-10 22:16 ` [PATCH 4/8] platform/chrome: cros_ec: register shutdown function for debugfs Thierry Escande
2017-08-11 4:01 ` Benson Leung
2017-08-10 22:16 ` [PATCH 5/8] mfd: cros_ec: fail early if we cannot identify the EC Thierry Escande
2017-08-11 4:06 ` Benson Leung
2017-08-10 22:16 ` [PATCH 6/8] mfd: cros_ec_i2c: add ACPI module device table Thierry Escande
2017-08-11 4:11 ` Benson Leung
2017-08-10 22:16 ` [PATCH 7/8] platform/chrome: cros_ec: Add sysfs entry to set keyboard wake lid angle Thierry Escande
2017-08-11 5:29 ` Benson Leung
2017-08-11 13:07 ` Thierry Escande
2017-08-10 22:16 ` [PATCH 8/8] platform/chrome: cros_ec: sysfs: Modify error handling Thierry Escande
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=1502403410-5233-3-git-send-email-thierry.escande@collabora.com \
--to=thierry.escande@collabora.com \
--cc=bleung@chromium.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®