Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751861AbdITWcS (ORCPT ); Wed, 20 Sep 2017 18:32:18 -0400 Received: from mail-pg0-f48.google.com ([74.125.83.48]:48833 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751808AbdITWcO (ORCPT ); Wed, 20 Sep 2017 18:32:14 -0400 X-Google-Smtp-Source: AOwi7QCbDU45zC5Xm4jOAxxDibMOB5h3SbiOuZD8GcGMoPkM8EB6bhcXuTdJ22DLsni8uoMcsjALyw== From: Rajat Jain To: Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Lee Jones , "Wysocki, Rafael J" , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Len Brown , furquan@google.com, rajatxjain@gmail.com Cc: Rajat Jain Subject: [PATCH 2/2] mfd: intel-lpss: switch to suspend_late()/resume_early() Date: Wed, 20 Sep 2017 15:31:52 -0700 Message-Id: <20170920223152.100641-2-rajatja@google.com> X-Mailer: git-send-email 2.14.1.821.g8fa685d3b7-goog In-Reply-To: <20170920223152.100641-1-rajatja@google.com> References: <20170920223152.100641-1-rajatja@google.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1409 Lines: 38 Ref: https://lkml.org/lkml/2017/9/19/649 The intel-lpss hosts the designware i2c controller device, which needs to be up and running until all its i2c child devices have suspended (child devices need to be accessible over i2c until suspend_late() has been called for all those devices). So lets delay the resetting of the controller until suspend_late(). I thought of renaming function to say *_late / *_early but that might cause confusion since the same function is also used for runtime suspend/resume. Fixes: 0b471aaa0e1a ("Put I2C and SPI controllers into reset state on suspend") Signed-off-by: Rajat Jain --- drivers/mfd/intel-lpss.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/mfd/intel-lpss.h b/drivers/mfd/intel-lpss.h index 694116630ffa..865bbeaaf00c 100644 --- a/drivers/mfd/intel-lpss.h +++ b/drivers/mfd/intel-lpss.h @@ -38,12 +38,7 @@ int intel_lpss_resume(struct device *dev); #ifdef CONFIG_PM_SLEEP #define INTEL_LPSS_SLEEP_PM_OPS \ .prepare = intel_lpss_prepare, \ - .suspend = intel_lpss_suspend, \ - .resume = intel_lpss_resume, \ - .freeze = intel_lpss_suspend, \ - .thaw = intel_lpss_resume, \ - .poweroff = intel_lpss_suspend, \ - .restore = intel_lpss_resume, + SET_LATE_SYSTEM_SLEEP_PM_OPS(intel_lpss_suspend, intel_lpss_resume) #else #define INTEL_LPSS_SLEEP_PM_OPS #endif -- 2.14.1.821.g8fa685d3b7-goog