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: 3900811 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8F15E9F334 for ; Fri, 28 Mar 2014 05:21:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BFA3B202F0 for ; Fri, 28 Mar 2014 05:21:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6390202E6 for ; Fri, 28 Mar 2014 05:21:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753229AbaC1FUn (ORCPT ); Fri, 28 Mar 2014 01:20:43 -0400 Received: from mail-pb0-f49.google.com ([209.85.160.49]:57178 "EHLO mail-pb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753225AbaC1FUl (ORCPT ); Fri, 28 Mar 2014 01:20:41 -0400 Received: by mail-pb0-f49.google.com with SMTP id jt11so4428909pbb.8 for ; Thu, 27 Mar 2014 22:20: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:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2MeqfEJ61Dg1gEgTtI+8NZt3aA/LH+2dULpC9Y/53AU=; b=LDREc1xXzJpK8gBR55B7eNlPjMlHsKLwJeoc46NvJr42ae6VkkQnDR0mD/KCEwKW8h +oF/GinVTUCGp7wk0yP0FpmsjPBNBiRQ6lylVUlIKYeGoHyQBTRPYB5w2hEsHdOc1EwQ XfFSkNVq3lBYmun2tvpwdxpeOdJU2tkGYIrrXf9TU8CsUD/U3Em9lVckVJ/IHjUpPIEb I8RmkN7Gj8SwDiOOyEBXAsCweN+PSmNHz8JJ9FskRlU2Hf3E9+MAzP411Yx9rVkeqlw0 fBpF/P37IGt7wgyvIedDo9P0r39rY55UmUsbORn8eOEPAgk75bLo/r1I0FBDY8kQWci4 Fnrg== X-Gm-Message-State: ALoCoQnYGlQFrVb1m2YKoGge+S2q4N07r8xCJ21zhQzPF+SasJhwIE8ZrIQSs/quXg0Wzgf7trzP 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)