Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2016859yba; Tue, 2 Apr 2019 22:45:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCG17KjL7wCx5ovRInxta4TcFpqpzy8YcnBiTKgW67pV+JIcv1djZfWFnOm79ZDJvimmtd X-Received: by 2002:aa7:8d17:: with SMTP id j23mr3648334pfe.62.1554270302140; Tue, 02 Apr 2019 22:45:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554270302; cv=none; d=google.com; s=arc-20160816; b=RbsyrUHf2Yp6chDWUJHVFsiyQfIqmFI4lVHJVlaNLtWwV6OrjLPvo8Zg2SpgPs7mhV phq5mFSuy+pHnI/8ndKHAzJcgpVtxrLRBAyvH4rk0h/XdomKkGGkqlEp7nTp+1jsODn6 fDxrWbky0OUwDMf3Y2ti6YqFqqfiALtTN8m+pmCV7YZ7OsFN5jTMSkui2ULDSoIQluN3 TJSrtrkA91QnIlTi135GBQTATRZOGIxXYwOylNVNb8Cj+DaKcatLKpMq/7BDheuLk2wj PoUsdhO1Rtdcty9uGk64zGWaSyv/xy2vOSfKM5Izk6PurgbRS1GyweiuuJbItQuaopAV uNzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=WJOeHXNco3Ee8JuLpbPl9yPwXXk5kcAXk6kw5oLhA0s=; b=aV4MocVMC3qfYdfw9tW3Z8rHqbU0r7fuFAchsSnvayQolmWlRx+7BR9VUVvj341tcS PKI8gBZDHE4s1pMGDcowgbqexqGlH17AclOJbcedTQFzRd8j8NgXmESA4m2P1SL6lxU9 7vfvIxvB4xRpyXnhIh2wiIwaPuZHfSqZ5/GFs3d55pdZbKT1DeY9Psz8/Y0YCDcZ0+qT J97SrxV/8VFKGMdQJBrG/eSUjtLHz2wa18zwhMVQ4e+zKkDOOeREwmsgFAl8VQaamNZl bTkWNeUd2NoyomqqB0rZlVATEA+HrPsvf5PyYOo/TdD/V7SzDkDHZsnogrykx8RbB/jk oHog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5si12717985plr.5.2019.04.02.22.44.44; Tue, 02 Apr 2019 22:45:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728731AbfDCFoF (ORCPT + 99 others); Wed, 3 Apr 2019 01:44:05 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:49210 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbfDCFoF (ORCPT ); Wed, 3 Apr 2019 01:44:05 -0400 Received: from 61-220-137-37.hinet-ip.hinet.net ([61.220.137.37] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1hBYgo-0004uA-Bo; Wed, 03 Apr 2019 05:43:58 +0000 From: Kai-Heng Feng 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 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 Message-Id: <20190403054352.30120-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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