From patchwork Fri Jul 31 06:26:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51739 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id 0035622A24 for ; Fri, 31 Jul 2015 06:26:42 +0000 (UTC) Received: by labkf3 with SMTP id kf3sf2724864lab.0 for ; Thu, 30 Jul 2015 23:26:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=OUTVN7vEPR20+Wr4pzHjeMHX9P48X0K67t89E2ceLhE=; b=JWLhOG3d0lFfLNvEeYcRY3vnMs5l8m+tKfa18pgywgOuEdPfbK9cJgEuaPbnfTQRFl yV0uYUE+2/K9kTET4TruXxuQ3iptosd4SjdDWyN1O1yOFQVBlqS2VKS2LM2uiyG3DvSa DdjAC4C+A0gA0C/bqKm4V7deonC4P6bbN/qwe7fDE2jYaw4l2dVZjSd8Liw+LHa3rPCH BCv8l4I+YADKE0xFIb8bPveXeQo10pm3P0+uJiYqe6HYC4zIKeGyoRZUhrkINZwr2UIi JgG3L23H7s8l1y7WGKv4+jS/D+6+t8l24uWEDuxDJomF++KTxAXZ51B7c1d1JDgp733e Y6LQ== X-Gm-Message-State: ALoCoQllDlxQsycNG0LesgE7DewJ4r8rO5jjPfM1cJsqvwpOfpwSwuzeItgtbDe9S2Wfp+V8+asr X-Received: by 10.180.87.201 with SMTP id ba9mr538817wib.3.1438324000602; Thu, 30 Jul 2015 23:26:40 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.169 with SMTP id f9ls274104lam.93.gmail; Thu, 30 Jul 2015 23:26:40 -0700 (PDT) X-Received: by 10.112.159.226 with SMTP id xf2mr1086941lbb.74.1438324000318; Thu, 30 Jul 2015 23:26:40 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id o20si2703627lal.90.2015.07.30.23.26.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2015 23:26:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by laah7 with SMTP id h7so37890323laa.0 for ; Thu, 30 Jul 2015 23:26:40 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr1087211lbc.19.1438324000154; Thu, 30 Jul 2015 23:26:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp168782lba; Thu, 30 Jul 2015 23:26:38 -0700 (PDT) X-Received: by 10.70.55.229 with SMTP id v5mr3240844pdp.136.1438323998626; Thu, 30 Jul 2015 23:26:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si7934750pds.186.2015.07.30.23.26.37; Thu, 30 Jul 2015 23:26:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752031AbbGaG0h (ORCPT + 12 others); Fri, 31 Jul 2015 02:26:37 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:35113 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751978AbbGaG0g (ORCPT ); Fri, 31 Jul 2015 02:26:36 -0400 Received: by pabkd10 with SMTP id kd10so35690154pab.2 for ; Thu, 30 Jul 2015 23:26:35 -0700 (PDT) X-Received: by 10.66.158.65 with SMTP id ws1mr3402227pab.18.1438323995762; Thu, 30 Jul 2015 23:26:35 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id j9sm5465327pdl.65.2015.07.30.23.26.34 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 Jul 2015 23:26:35 -0700 (PDT) Date: Fri, 31 Jul 2015 11:56:30 +0530 From: Viresh Kumar To: Stephen Boyd Cc: Rafael Wysocki , linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, rob.herring@linaro.org, arnd.bergmann@linaro.org, nm@ti.com, broonie@kernel.org, mturquette@baylibre.com, Sudeep.Holla@arm.com, viswanath.puttagunta@linaro.org, l.stach@pengutronix.de, thomas.petazzoni@free-electrons.com, linux-arm-kernel@lists.infradead.org, ta.omasab@gmail.com, kesavan.abhilash@gmail.com, khilman@linaro.org, santosh.shilimkar@oracle.com, b.zolnierkie@samsung.com, Greg Kroah-Hartman , Len Brown , open list , Pavel Machek Subject: Re: [PATCH V3 10/16] PM / OPP: Add support for opp-suspend Message-ID: <20150731062630.GR17794@linux> References: <3d1b8d7de9f2ad34d979540e367ed691bcb7bb77.1438166099.git.viresh.kumar@linaro.org> <20150731062406.GS3159@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150731062406.GS3159@codeaurora.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On 30-07-15, 23:24, Stephen Boyd wrote: > On 07/29, Viresh Kumar wrote: > > With "operating-points-v2" bindings, its possible to specify the OPP to > > s/its/it's/ ? > > > which the device must be switched, before suspending. > > > > This patch adds support for getting that information. > > > > Reviewed-by: Bartlomiej Zolnierkiewicz > > Signed-off-by: Viresh Kumar > > --- > > Reviewed-by: Stephen Boyd ---------------------8<------------------- Message-Id: <5e0cf40cc78bfa327cbbccae016d03a1dfbd1a84.1438323941.git.viresh.kumar@linaro.org> From: Viresh Kumar Date: Sat, 13 Jun 2015 15:10:21 +0530 Subject: [PATCH] PM / OPP: Add support for opp-suspend With "operating-points-v2" bindings, it's possible to specify the OPP to which the device must be switched, before suspending. This patch adds support for getting that information. Reviewed-by: Stephen Boyd Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Viresh Kumar --- drivers/base/power/opp.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index 5d699e3ec136..0ebcea49145a 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c @@ -133,6 +133,7 @@ struct device_opp { struct device_node *np; unsigned long clock_latency_ns_max; bool shared_opp; + struct dev_pm_opp *suspend_opp; }; /* @@ -923,6 +924,16 @@ static int _opp_add_static_v2(struct device *dev, struct device_node *np) if (ret) goto free_opp; + /* OPP to select on device suspend */ + if (of_property_read_bool(np, "opp-suspend")) { + if (dev_opp->suspend_opp) + dev_warn(dev, "%s: Multiple suspend OPPs found (%lu %lu)\n", + __func__, dev_opp->suspend_opp->rate, + new_opp->rate); + else + dev_opp->suspend_opp = new_opp; + } + if (new_opp->clock_latency_ns > dev_opp->clock_latency_ns_max) dev_opp->clock_latency_ns_max = new_opp->clock_latency_ns;