From patchwork Fri Mar 28 05:20:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 27241 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 184AD20062 for ; Fri, 28 Mar 2014 05:21:14 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id a41sf10690081yho.6 for ; Thu, 27 Mar 2014 22:21:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=NPA/NI5QnLvpR4unxKqhWKgk2sM+TnwCYDEpR4YMnjQ=; b=hJgeCGHIG+qc4UfwIP0nwEJrpGvenB9BeHWGek0TlQQaMDiJFDOWEAwyfXRZafRGMc K2NT6b6ywfVZmn2oUPb6GVSXXMGc6j/TuJZuurFdTsnQn93ErMbYiN6hq2W77vzyW+34 0EgSYnkXtYnJqAHK8xKFI9rljkSyPoZgSkpPdnmDw14A+L1UeoFBnIz8JOepERaJrGSG EgQYkvYKN6rkK3Hh85qaWschqJaReqQMJFwiNEhingfuYUbjUGGZ1gGMx5Hz+Vo2po/l 25ROGNYBytri3s3L8BM3qonvcTQkGQoMIxVQSAbsaKXQUcVxCrT674REUTP8ukygSWDQ 9kpg== X-Gm-Message-State: ALoCoQkLGR+lDblROOPXD90/MsAgLbEIkhwlLtR5ZUIHa4lOQ1bwLvjMfQ3fQjj35zz9c8oN0L6+ X-Received: by 10.236.182.230 with SMTP id o66mr1974964yhm.12.1395984073807; Thu, 27 Mar 2014 22:21:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.39.133 with SMTP id v5ls1331735qgv.23.gmail; Thu, 27 Mar 2014 22:21:13 -0700 (PDT) X-Received: by 10.52.164.237 with SMTP id yt13mr4475893vdb.18.1395984073751; Thu, 27 Mar 2014 22:21:13 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id fn10si1058978vdc.171.2014.03.27.22.21.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Mar 2014 22:21:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id lf12so5274550vcb.25 for ; Thu, 27 Mar 2014 22:21:13 -0700 (PDT) X-Received: by 10.52.171.68 with SMTP id as4mr4457059vdc.0.1395984073675; Thu, 27 Mar 2014 22:21:13 -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.220.78.9 with SMTP id i9csp7825vck; Thu, 27 Mar 2014 22:21:13 -0700 (PDT) X-Received: by 10.69.31.171 with SMTP id kn11mr6269666pbd.47.1395984072721; Thu, 27 Mar 2014 22:21:12 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zt8si2896493pbc.402.2014.03.27.22.21.12; Thu, 27 Mar 2014 22:21:12 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753517AbaC1FUp (ORCPT + 27 others); Fri, 28 Mar 2014 01:20:45 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:48948 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753218AbaC1FUl (ORCPT ); Fri, 28 Mar 2014 01:20:41 -0400 Received: by mail-pd0-f182.google.com with SMTP id y10so4319787pdj.41 for ; Thu, 27 Mar 2014 22:20:40 -0700 (PDT) X-Received: by 10.66.189.226 with SMTP id gl2mr6245387pac.65.1395984040453; Thu, 27 Mar 2014 22:20:40 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id ci4sm17521715pbb.50.2014.03.27.22.20.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Mar 2014 22:20:39 -0700 (PDT) From: Tushar Behera To: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: rob@landley.net, olof@lixom.net, "Rafael J. Wysocki" , linux-pm@vger.kernel.org Subject: [PATCH 1/2] PM / Domains: Add pd_ignore_unused to keep power domains enabled Date: Fri, 28 Mar 2014 10:50:21 +0530 Message-Id: <1395984022-8284-2-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1395984022-8284-1-git-send-email-tushar.behera@linaro.org> References: <1395984022-8284-1-git-send-email-tushar.behera@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , Keep all power-domains already enabled by bootloader on, even if no driver has claimed them. This is useful for debug and development, but should not be needed on a platform with proper driver support. Signed-off-by: Tushar Behera CC: "Rafael J. Wysocki" CC: linux-pm@vger.kernel.org --- Documentation/kernel-parameters.txt | 7 +++++++ drivers/base/power/domain.c | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 50a001a..96bb532 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -2557,6 +2557,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. pcmv= [HW,PCMCIA] BadgePAD 4 + pd_ignore_unused + [PM] + Keep all power-domains already enabled by bootloader on, + even if no driver has claimed them. This is useful + for debug and development, but should not be + needed on a platform with proper driver support. + pd. [PARIDE] See Documentation/blockdev/paride.txt. diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 6f54962..ae098a2 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -705,6 +705,14 @@ static int pm_genpd_runtime_resume(struct device *dev) return 0; } +static bool pd_ignore_unused; +static int __init pd_ignore_unused_setup(char *__unused) +{ + pd_ignore_unused = true; + return 1; +} +__setup("pd_ignore_unused", pd_ignore_unused_setup); + /** * pm_genpd_poweroff_unused - Power off all PM domains with no devices in use. */ @@ -712,6 +720,11 @@ void pm_genpd_poweroff_unused(void) { struct generic_pm_domain *genpd; + if (pd_ignore_unused) { + pr_warn("genpd: Not disabling unused power domains\n"); + return; + } + mutex_lock(&gpd_list_lock); list_for_each_entry(genpd, &gpd_list, gpd_list_node)