Message ID | 20190418113933.11158-1-hdegoede@redhat.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Rafael Wysocki |
Headers | show |
Series | ACPI / LPSS: Use acpi_lpss_* instead of acpi_subsys_* functions for hibernate | expand |
On Thu, Apr 18, 2019 at 1:39 PM Hans de Goede <hdegoede@redhat.com> wrote: > > 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 that on resume from hibernate dw_i2c_plat_resume() doesn't get > called by the restore_early callback, acpi_lpss_resume_early(). Instead it > should be called by the restore_noirq callback matching how things are done > when resume_from_noirq is set and we are doing a regular resume. > > Change the restore_noirq callback to acpi_lpss_resume_noirq so that > dw_i2c_plat_resume() gets properly called when resume_from_noirq is set > and we are resuming from hibernate. > > Likewise also change the poweroff_noirq callback so that > dw_i2c_plat_suspend gets called properly. > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202139 > Fixes: 48402cee6889 ("ACPI / LPSS: Resume BYT/CHT I2C controllers from resume_noirq") > Cc: Kai-Heng Feng <kai.heng.feng@canonical.com> > Reported-by: Kai-Heng Feng <kai.heng.feng@canonical.com> > Signed-off-by: Hans de Goede <hdegoede@redhat.com> Queued up, thanks! I've tentatively tagged it for 4.20+ "stable" inclusion, please let me know if you think that's not appropriate.
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 1e2a10a06b9d..cf768608437e 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -1142,8 +1142,8 @@ static struct dev_pm_domain acpi_lpss_pm_domain = { .thaw_noirq = acpi_subsys_thaw_noirq, .poweroff = acpi_subsys_suspend, .poweroff_late = acpi_lpss_suspend_late, - .poweroff_noirq = acpi_subsys_suspend_noirq, - .restore_noirq = acpi_subsys_resume_noirq, + .poweroff_noirq = acpi_lpss_suspend_noirq, + .restore_noirq = acpi_lpss_resume_noirq, .restore_early = acpi_lpss_resume_early, #endif .runtime_suspend = acpi_lpss_runtime_suspend,
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 that on resume from hibernate dw_i2c_plat_resume() doesn't get called by the restore_early callback, acpi_lpss_resume_early(). Instead it should be called by the restore_noirq callback matching how things are done when resume_from_noirq is set and we are doing a regular resume. Change the restore_noirq callback to acpi_lpss_resume_noirq so that dw_i2c_plat_resume() gets properly called when resume_from_noirq is set and we are resuming from hibernate. Likewise also change the poweroff_noirq callback so that dw_i2c_plat_suspend gets called properly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202139 Fixes: 48402cee6889 ("ACPI / LPSS: Resume BYT/CHT I2C controllers from resume_noirq") Cc: Kai-Heng Feng <kai.heng.feng@canonical.com> Reported-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/acpi/acpi_lpss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)