From patchwork Wed Feb 8 16:34:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 9562787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A9B5E60434 for ; Wed, 8 Feb 2017 16:37:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA15627F4B for ; Wed, 8 Feb 2017 16:37:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEF4B283E8; Wed, 8 Feb 2017 16:37:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 621DB27F4B for ; Wed, 8 Feb 2017 16:37:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752664AbdBHQhM (ORCPT ); Wed, 8 Feb 2017 11:37:12 -0500 Received: from mail-pf0-f176.google.com ([209.85.192.176]:35645 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752068AbdBHQfo (ORCPT ); Wed, 8 Feb 2017 11:35:44 -0500 Received: by mail-pf0-f176.google.com with SMTP id f144so43422521pfa.2 for ; Wed, 08 Feb 2017 08:35:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AIK7z8rHRedIRJfEUHdpAZp9nUMibUu4HhEhwz/LjJU=; b=bxvy+B+Rzvd/yQnMbx3NBpl6tol3rUIKMHOeeWHJ86KbcjuwQfMfKSBi9Bv4F9ofhv xHPuN7UMcyI/Q6TU/Pi1eFCoWW7spMc3rQEpGVttFocqCtv/d0pEiIqihwaW5vKgwd0t GvlQfotr5T2FFY8Fgl8X7tdADbE42B1xCqvl0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AIK7z8rHRedIRJfEUHdpAZp9nUMibUu4HhEhwz/LjJU=; b=XKkv2KKXBTVdkBvIzIJfF8rVt/+YEMd+J2oFaBrL7aYhCR9VRMiCudwWUuOA93SlJy IbV+zODWM4+8uckcatz3QVt27giO2bxhSRk/aBHXUpIzlZmrGNN4cAOd+1usACBB9QVH GQt15wfDCOFbVeMukJZftWmjlykdL8C0E48WfWGWpAVSB+NqU4rG0az8o8prLDx8Gyrb t0r+JU76hGVWpALnGvNZ7urNaHESfvYTbAgVlX0JgXHrWC/CF5xnlVvI6zW0YERZ6JHu 7xefcFdXBaGw129uGwDids5ucfDTcKCK4H81GOW/41ugk0tX9CvLEfAK+yg4lfyzkMIO jyUw== X-Gm-Message-State: AIkVDXIG6jkDqZQGf7WNe3oZYAVnkx5a9HgNyQNZTrpzWSM6E4os/vWW7yyzf38Dxv0tD/Z3 X-Received: by 10.84.241.66 with SMTP id u2mr35209100plm.107.1486571704916; Wed, 08 Feb 2017 08:35:04 -0800 (PST) Received: from ubuntu.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id y23sm21653325pfi.66.2017.02.08.08.35.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Feb 2017 08:35:03 -0800 (PST) From: Lina Iyer To: ulf.hansson@linaro.org, khilman@kernel.org, rjw@rjwysocki.net, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: andy.gross@linaro.org, sboyd@codeaurora.org, linux-arm-msm@vger.kernel.org, brendan.jackman@arm.com, lorenzo.pieralisi@arm.com, sudeep.holla@arm.com, Juri.Lelli@arm.com, Lina Iyer , devicetree@vger.kernel.org, Rob Herring Subject: [PATCH] PM / Domains: Fix compatible for domain idle state Date: Wed, 8 Feb 2017 08:34:50 -0800 Message-Id: <1486571692-33212-2-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486571692-33212-1-git-send-email-lina.iyer@linaro.org> References: <1486571692-33212-1-git-send-email-lina.iyer@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Re-using idle state definition provided by arm,idle-state for domain idle states creates a lot of confusion and limits further evolution of the domain idle definition. To keep things clear and simple, define a idle states for domain using a new compatible "domain-idle-state". Fix existing PM domains code to look for the newly defined compatible. Cc: Cc: Rob Herring Signed-off-by: Lina Iyer --- .../bindings/power/domain-idle-state.txt | 33 ++++++++++++++++++++++ .../devicetree/bindings/power/power_domain.txt | 8 +++--- drivers/base/power/domain.c | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/domain-idle-state.txt diff --git a/Documentation/devicetree/bindings/power/domain-idle-state.txt b/Documentation/devicetree/bindings/power/domain-idle-state.txt new file mode 100644 index 0000000..eefc7ed --- /dev/null +++ b/Documentation/devicetree/bindings/power/domain-idle-state.txt @@ -0,0 +1,33 @@ +PM Domain Idle State Node: + +A domain idle state node represents the state parameters that will be used to +select the state when there are no active components in the domain. + +The state node has the following parameters - + +- compatible: + Usage: Required + Value type: + Definition: Must be "domain-idle-state". + +- entry-latency-us + Usage: Required + Value type: + Definition: u32 value representing worst case latency in + microseconds required to enter the idle state. + The exit-latency-us duration may be guaranteed + only after entry-latency-us has passed. + +- exit-latency-us + Usage: Required + Value type: + Definition: u32 value representing worst case latency + in microseconds required to exit the idle state. + +- min-residency-us + Usage: Required + Value type: + Definition: u32 value representing minimum residency duration + in microseconds after which the idle state will yield + power benefits after overcoming the overhead in entering +i the idle state. diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt index e165036..723e1ad 100644 --- a/Documentation/devicetree/bindings/power/power_domain.txt +++ b/Documentation/devicetree/bindings/power/power_domain.txt @@ -31,7 +31,7 @@ Optional properties: - domain-idle-states : A phandle of an idle-state that shall be soaked into a generic domain power state. The idle state definitions are - compatible with arm,idle-state specified in [1]. + compatible with domain-idle-state specified in [1]. The domain-idle-state property reflects the idle state of this PM domain and not the idle states of the devices or sub-domains in the PM domain. Devices and sub-domains have their own idle-states independent of the parent @@ -85,7 +85,7 @@ Example 3: }; DOMAIN_RET: state@0 { - compatible = "arm,idle-state"; + compatible = "domain-idle-state"; reg = <0x0>; entry-latency-us = <1000>; exit-latency-us = <2000>; @@ -93,7 +93,7 @@ Example 3: }; DOMAIN_PWR_DN: state@1 { - compatible = "arm,idle-state"; + compatible = "domain-idle-state"; reg = <0x1>; entry-latency-us = <5000>; exit-latency-us = <8000>; @@ -118,4 +118,4 @@ The node above defines a typical PM domain consumer device, which is located inside a PM domain with index 0 of a power controller represented by a node with the label "power". -[1]. Documentation/devicetree/bindings/arm/idle-states.txt +[1]. Documentation/devicetree/bindings/power/domain-idle-state.txt diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 661737c..f0bc672 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -2048,7 +2048,7 @@ int genpd_dev_pm_attach(struct device *dev) EXPORT_SYMBOL_GPL(genpd_dev_pm_attach); static const struct of_device_id idle_state_match[] = { - { .compatible = "arm,idle-state", }, + { .compatible = "domain-idle-state", }, { } };