linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
To: rjw@rjwysocki.net
Cc: lenb@kernel.org, hdegoede@redhat.com, rhowell@uwyo.edu,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kai-Heng Feng <kai.heng.feng@canonical.com>
Subject: [PATCH] ACPI / LPSS: Don't skip late system PM ops for hibernate on BYT/CHT
Date: Wed,  3 Apr 2019 13:43:52 +0800	[thread overview]
Message-ID: <20190403054352.30120-1-kai.heng.feng@canonical.com> (raw)

i2c-designware-platdrv fails to work after the system restored from
hibernation:
[ 272.775692] i2c_designware 80860F41:00: Unknown Synopsys component type: 0xffffffff

Commit 48402cee6889 ("ACPI / LPSS: Resume BYT/CHT I2C controllers from
resume_noirq") makes acpi_lpss_{suspend_late,resume_early}() bail early
on BYT/CHT as resume_from_noirq is set. This means dw_i2c_plat_resume()
doesn't gets called by acpi_lpss_resume_early(), and this causes the
issue.

Introduce acpi_lpss_{poweroff_late,restore_early}() to make sure
driver's own poweroff_late and restore_early get called.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202139
Fixes: 48402cee6889 ("ACPI / LPSS: Resume BYT/CHT I2C controllers from resume_noirq")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/acpi/acpi_lpss.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 1e2a10a06b9d..49aef186d73d 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -1058,6 +1058,11 @@ static int acpi_lpss_suspend_late(struct device *dev)
 	return acpi_lpss_do_suspend_late(dev);
 }
 
+static int acpi_lpss_poweroff_late(struct device *dev)
+{
+	return acpi_lpss_do_suspend_late(dev);
+}
+
 static int acpi_lpss_suspend_noirq(struct device *dev)
 {
 	struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev));
@@ -1089,6 +1094,11 @@ static int acpi_lpss_resume_early(struct device *dev)
 	return acpi_lpss_do_resume_early(dev);
 }
 
+static int acpi_lpss_restore_early(struct device *dev)
+{
+	return acpi_lpss_do_resume_early(dev);
+}
+
 static int acpi_lpss_resume_noirq(struct device *dev)
 {
 	struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev));
@@ -1141,10 +1151,10 @@ static struct dev_pm_domain acpi_lpss_pm_domain = {
 		.freeze_noirq = acpi_subsys_freeze_noirq,
 		.thaw_noirq = acpi_subsys_thaw_noirq,
 		.poweroff = acpi_subsys_suspend,
-		.poweroff_late = acpi_lpss_suspend_late,
+		.poweroff_late = acpi_lpss_poweroff_late,
 		.poweroff_noirq = acpi_subsys_suspend_noirq,
 		.restore_noirq = acpi_subsys_resume_noirq,
-		.restore_early = acpi_lpss_resume_early,
+		.restore_early = acpi_lpss_restore_early,
 #endif
 		.runtime_suspend = acpi_lpss_runtime_suspend,
 		.runtime_resume = acpi_lpss_runtime_resume,
-- 
2.17.1

             reply	other threads:[~2019-04-03  5:43 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03  5:43 Kai-Heng Feng [this message]
2019-04-03  8:33 ` [PATCH] ACPI / LPSS: Don't skip late system PM ops for hibernate on BYT/CHT Jarkko Nikula
2019-04-03  8:54 ` Hans de Goede
2019-04-07 20:58   ` Robert R. Howell
2019-04-07 20:58     ` Robert R. Howell
2019-04-08  3:44     ` Kai Heng Feng
2019-04-08  3:44       ` Kai Heng Feng
2019-04-11 19:50       ` Robert R. Howell
2019-04-11 19:50         ` Robert R. Howell
2019-04-08  8:16     ` Hans de Goede
2019-04-08  8:16       ` Hans de Goede
2019-04-11 19:50       ` Robert R. Howell
2019-04-11 19:50         ` Robert R. Howell
2019-04-18 11:42         ` Hans de Goede
2019-04-18 11:42           ` Hans de Goede
2019-04-19 22:44           ` Robert R. Howell
2019-04-19 22:44             ` Robert R. Howell
2019-04-23  8:07             ` Rafael J. Wysocki
2019-04-23  8:07               ` Rafael J. Wysocki
2019-04-23 20:03               ` Robert R. Howell
2019-04-23 20:03                 ` Robert R. Howell
2019-04-24  7:20                 ` Rafael J. Wysocki
2019-04-24  7:20                   ` Rafael J. Wysocki
2019-04-25 16:38                   ` Robert R. Howell
2019-04-25 16:38                     ` Robert R. Howell
2019-04-30 14:39                     ` Hans de Goede
2019-04-30 14:39                       ` Hans de Goede
2019-05-09  4:24                       ` Robert R. Howell
2019-05-09  8:50                         ` Hans de Goede
2019-05-09 18:09                           ` Robert R. Howell
2019-05-13  8:41                             ` Hans de Goede
2019-05-16 16:34                               ` Robert R. Howell
2019-05-14 10:10                             ` Hans de Goede
2019-05-16 11:11                     ` Rafael J. Wysocki
2019-05-16 16:35                       ` Robert R. Howell
2019-05-16 22:42                         ` Rafael J. Wysocki
2019-05-25  5:31                       ` Robert R. Howell
2019-06-24 10:24                         ` Rafael J. Wysocki
2019-06-24 10:51                           ` Hans de Goede
2019-06-24 23:14                             ` Rafael J. Wysocki
2019-06-26 18:43                           ` Robert R. Howell

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=20190403054352.30120-1-kai.heng.feng@canonical.com \
    --to=kai.heng.feng@canonical.com \
    --cc=hdegoede@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rhowell@uwyo.edu \
    --cc=rjw@rjwysocki.net \
    /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).