From patchwork Thu Nov 3 21:54:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 9411569 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 0635A60234 for ; Thu, 3 Nov 2016 21:58:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA2462AF41 for ; Thu, 3 Nov 2016 21:58:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEC242AF65; Thu, 3 Nov 2016 21:58:26 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 86C1A2AF41 for ; Thu, 3 Nov 2016 21:58:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2PzN-0007oC-Tc; Thu, 03 Nov 2016 21:56:01 +0000 Received: from mail-yw0-x233.google.com ([2607:f8b0:4002:c05::233]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2PzB-0007Hm-Vp for linux-arm-kernel@lists.infradead.org; Thu, 03 Nov 2016 21:55:53 +0000 Received: by mail-yw0-x233.google.com with SMTP id r204so68431467ywb.0 for ; Thu, 03 Nov 2016 14:55:27 -0700 (PDT) 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=U2pWr+119s9k6ff9UlTW5UV2V2YOF6kW/t6abpfZZ1hErckC5PFEgNkAF80GnDPMtx 21XAcevYmsSyHDo2Z12yx9acHp3qixSsgyY0qkmHnsNrEWD4lU+wCK+pxx6eNouuv4gZ wCRSCspqDmGduoE9AZOSvYgq+NQFFtfjNO1JM= 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=AIK7z8rHRedIRJfEUHdpAZp9nUMibUu4HhEhwz/LjJU=; b=ME/ybWBTAkaWqlkQFVlH8KDjOyBw5TfIcVVf0my8qblmmuZmSw5kf0Ko21eBqSmwp1 VtxrtlclTyL0egw4gqDlnSf1/CJaso0INTul82HQlY8yWzC8WYZrT/Y3BiuHC1WZ9F5f 8AOcIs/ibSNmN67IIBjQnK4YLW/cZE27sCid0g61qL8f7/qkIiU8/sT4bOnwgLKGzlTz wbgQ8Mn4774NCrvMPbnhyvoJzyrX8fJMsS9gov3WriKo7BoHZOwAFLNGXwnCNzM+KJgc lbIhYFxJ+mtuFSfM4/crOzeW+2xdIIj8Vf4h6WXxxtihvWOyL+zwEOW3Tq56htO4CYiW kyGA== X-Gm-Message-State: ABUngvcjrmcEUoSFTKQaRnpMUNMH+oAZCs1apFONoaapqsyAsE/EGbxLrLsjqYnyYWr0vD8s X-Received: by 10.36.66.212 with SMTP id i203mr76420itb.80.1478210126248; Thu, 03 Nov 2016 14:55:26 -0700 (PDT) Received: from localhost.localdomain ([198.233.217.214]) by smtp.gmail.com with ESMTPSA id g96sm3543840iod.10.2016.11.03.14.55.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Nov 2016 14:55:25 -0700 (PDT) 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 Subject: [PATCH] PM / Domains: Fix compatible for domain idle state Date: Thu, 3 Nov 2016 14:54:35 -0700 Message-Id: <1478210075-92045-2-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1478210075-92045-1-git-send-email-lina.iyer@linaro.org> References: <1478210075-92045-1-git-send-email-lina.iyer@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161103_145550_280781_BB3B215E X-CRM114-Status: GOOD ( 16.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, lorenzo.pieralisi@arm.com, Juri.Lelli@arm.com, linux-arm-msm@vger.kernel.org, sboyd@codeaurora.org, brendan.jackman@arm.com, sudeep.holla@arm.com, andy.gross@linaro.org, Lina Iyer MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Reviewed-by: Ulf Hansson Reviewed-by: Sudeep Holla --- .../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", }, { } };