Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp864533imm; Thu, 5 Jul 2018 10:12:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfF4HIQWSV6RscIoZU8wx9qcfHwAooV6R4kWBwyT0WUEQOHwtcpMBlDseTo/ad6Mc6oP/Ff X-Received: by 2002:a63:2404:: with SMTP id k4-v6mr6313353pgk.191.1530810733476; Thu, 05 Jul 2018 10:12:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530810733; cv=none; d=google.com; s=arc-20160816; b=Z7wgmeeCaCrcuumEeUUogxL5cMHv0ZJ7sslFN7PwYCGl6Zcn0+ft80m9LxzyJU6jM+ TrLQEj//ARiNIhbL/AmLQ2EDhopmKdWhqh7dKgvSzS/r18TwoqkhJ2Nw1g9b4I0Ug5bq QbjStY0OnNsJUINueeL6bTI5cmrkwXtzBSZQwOjAU1+BXDWjzUR5KSIkZQaXizVJQ0Wp 96xaN5JzfO4OIvc+HZjWXDKYOC9KE96/s8BlYrzMrY9eyVWLEET8nuh96FwDeWtzndFk 6xJTZabbiIrEPiL6bOuq+XMlsGcePYc/33RzPh4yYI+pzXKiO2Yl3AIkKpdGHWODleA3 wOQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=KWaVJqVZDS9l22Qxk3OIR+kyUrdULYUStQcrKp8SWhw=; b=K35M0g2tg9fLi8Zudki2VmfR5cHQD6RySvuRJknwhetmkjIw4RwoOi3epEtaWOU52k wt9CN1INP1PeX3kggN988wD2YNgIoNWmrRo0Jv6ZNTnzbbTe8cAe+9AFBT57JPgpYP/M dGJo0Ltp8SEEb0OhH4E+CVGQP/h2JWzWi6MYUjltNdp8TuumtjqQQACiBr97qHvm10s1 rLklXeK5BUaYyUhQkvtM7cDzanCCDdTqdxO3btJ+clEQnmyr7+A6haRLCDRPhzfITaZn fmZMwoITzzXzhWuHHzEz+o21ZnrPEcddRsjSFcmX7qYKTKGkTxaV6KzrH1iOG0oxDG0E 9nNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=dr7Gnbq7; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7-v6si6242197pgl.1.2018.07.05.10.11.35; Thu, 05 Jul 2018 10:12:13 -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; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=dr7Gnbq7; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754247AbeGERIL (ORCPT + 99 others); Thu, 5 Jul 2018 13:08:11 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:60768 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753525AbeGERIK (ORCPT ); Thu, 5 Jul 2018 13:08:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=KWaVJqVZDS9l22Qxk3OIR+kyUrdULYUStQcrKp8SWhw=; b=dr7Gnbq7r4rz 8Gc+7c+QKeN0Nl6ymAwP/lvhKDH6XvX4NfhvX5Hb+/yClW9atR8DOzz8KHUHu8dsYtg/Ll8q457ky 4rbogyVCEKnpu8pS6lYLDksin/Rhe5C4eDEuwbrMmP118MO5pkfKC/VrJKtKyjImzMxGCIR3Y2g/T 8UO34=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fb7ji-00010p-Hb; Thu, 05 Jul 2018 17:08:06 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1fb7ji-0000B7-3o; Thu, 05 Jul 2018 18:08:06 +0100 From: Mark Brown To: pascal paillet Cc: Mark Brown , "gregkh@linuxfoundation.org" , "lgirdwood@gmail.com" , "broonie@kernel.org" , "linux-kernel@vger.kernel.org" , "benjamin.gaignard@linaro.org" , Pascal PAILLET-LME , linux-kernel@vger.kernel.org Subject: Applied "regulator: core: Change suspend_late to suspend" to the regulator tree In-Reply-To: <1530800748-7300-4-git-send-email-p.paillet@st.com> Message-Id: Date: Thu, 05 Jul 2018 18:08:06 +0100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch regulator: core: Change suspend_late to suspend has been applied to the regulator tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 0380cf7dbaca75c524e34b30979f0806124fa8e6 Mon Sep 17 00:00:00 2001 From: pascal paillet Date: Thu, 5 Jul 2018 14:25:57 +0000 Subject: [PATCH] regulator: core: Change suspend_late to suspend Change suspend_late ops to suspend normal ops. The goal is to avoid requesting all the regulator drivers to be operational in suspend late phase. Signed-off-by: pascal paillet Signed-off-by: Mark Brown --- drivers/regulator/core.c | 26 +++++++++++++------------- include/linux/regulator/driver.h | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 6ed568b96c0e..da9b0fed8330 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -4441,7 +4441,7 @@ void regulator_unregister(struct regulator_dev *rdev) EXPORT_SYMBOL_GPL(regulator_unregister); #ifdef CONFIG_SUSPEND -static int _regulator_suspend_late(struct device *dev, void *data) +static int _regulator_suspend(struct device *dev, void *data) { struct regulator_dev *rdev = dev_to_rdev(dev); suspend_state_t *state = data; @@ -4455,20 +4455,20 @@ static int _regulator_suspend_late(struct device *dev, void *data) } /** - * regulator_suspend_late - prepare regulators for system wide suspend + * regulator_suspend - prepare regulators for system wide suspend * @state: system suspend state * * Configure each regulator with it's suspend operating parameters for state. */ -static int regulator_suspend_late(struct device *dev) +static int regulator_suspend(struct device *dev) { suspend_state_t state = pm_suspend_target_state; return class_for_each_device(®ulator_class, NULL, &state, - _regulator_suspend_late); + _regulator_suspend); } -static int _regulator_resume_early(struct device *dev, void *data) +static int _regulator_resume(struct device *dev, void *data) { int ret = 0; struct regulator_dev *rdev = dev_to_rdev(dev); @@ -4481,35 +4481,35 @@ static int _regulator_resume_early(struct device *dev, void *data) regulator_lock(rdev); - if (rdev->desc->ops->resume_early && + if (rdev->desc->ops->resume && (rstate->enabled == ENABLE_IN_SUSPEND || rstate->enabled == DISABLE_IN_SUSPEND)) - ret = rdev->desc->ops->resume_early(rdev); + ret = rdev->desc->ops->resume(rdev); regulator_unlock(rdev); return ret; } -static int regulator_resume_early(struct device *dev) +static int regulator_resume(struct device *dev) { suspend_state_t state = pm_suspend_target_state; return class_for_each_device(®ulator_class, NULL, &state, - _regulator_resume_early); + _regulator_resume); } #else /* !CONFIG_SUSPEND */ -#define regulator_suspend_late NULL -#define regulator_resume_early NULL +#define regulator_suspend NULL +#define regulator_resume NULL #endif /* !CONFIG_SUSPEND */ #ifdef CONFIG_PM static const struct dev_pm_ops __maybe_unused regulator_pm_ops = { - .suspend_late = regulator_suspend_late, - .resume_early = regulator_resume_early, + .suspend = regulator_suspend, + .resume = regulator_resume, }; #endif diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index dea96ee39fdc..0fd8fbb74763 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -220,7 +220,7 @@ struct regulator_ops { /* set regulator suspend operating mode (defined in consumer.h) */ int (*set_suspend_mode) (struct regulator_dev *, unsigned int mode); - int (*resume_early)(struct regulator_dev *rdev); + int (*resume)(struct regulator_dev *rdev); int (*set_pull_down) (struct regulator_dev *); }; -- 2.18.0.rc2