From patchwork Fri Oct 14 17:47:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 9377181 X-Patchwork-Delegate: rjw@sisk.pl 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 29F456022E for ; Fri, 14 Oct 2016 17:48:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FE062A70B for ; Fri, 14 Oct 2016 17:48:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 145E72A742; Fri, 14 Oct 2016 17:48:15 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 0813D2A70B for ; Fri, 14 Oct 2016 17:48:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756147AbcJNRsN (ORCPT ); Fri, 14 Oct 2016 13:48:13 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:36194 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754919AbcJNRsL (ORCPT ); Fri, 14 Oct 2016 13:48:11 -0400 Received: by mail-pf0-f177.google.com with SMTP id e6so52417648pfk.3 for ; Fri, 14 Oct 2016 10:48:11 -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=mXuoZjnp4Qqdnx18984eh5hd7SGvbmam53Ln7NIqzFg=; b=O3LDHvFaiJJpmEZMONB13WrQKDW11G/5ZKuAF1LuEC3PoWYDAUaCxGWJG94laQ2HII C1hfRy9XwryPdFRU81BrCrEqN+JV8Xv1NLidRdkEJHJedcXeUExyjtYCTG9HWszDn2zR tjUW6Uy5b6iBmfp2Rc+VMBIxRbSKDJh8Sx8C0= 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=mXuoZjnp4Qqdnx18984eh5hd7SGvbmam53Ln7NIqzFg=; b=NrY/+R9NbYl/NsgO/D0BCFEqzsubNaWVpo1Hc6HmX+gIqKGEevfvevCECxpMSyYdJN 3vV5YKIah73SiRT4TStPXPqbpIe6JfO8KSRwfE6x2cHcAAH0oS14RsJ6VyCO+f0VoDml 8SShT4UIYpETIbhNHU/8aLrWMWCq235YbVpJi3LMtcfDF/nSbEwN1Ro8eLkovfour60X v/URvscK+rS5Su5EjDX0UBj18iFTfjh5suCTtw04fyR85g1zg9iFSusjzzo7xOkruGaI 6/NccxDrVZ0o6ZE0Rp8Z3cY8bOgLbPpUo0thwFzKV8+ZjOkRl9CfIw5LyVLNxefj5O5E YCCA== X-Gm-Message-State: AA6/9RkTJF5YECXmQUJeJ5pEaQ+eG7Vy7M/jyWSiJnPhNa7A07r8IZmnuvwWp/dglZZ9gZpn X-Received: by 10.98.31.4 with SMTP id f4mr19754539pff.67.1476467291020; Fri, 14 Oct 2016 10:48:11 -0700 (PDT) Received: from ubuntu.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id q12sm6725466pfd.7.2016.10.14.10.48.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Oct 2016 10:48:10 -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 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 Subject: [PATCH v3 4/8] PM / Domains: Save the fwnode in genpd_power_state Date: Fri, 14 Oct 2016 10:47:52 -0700 Message-Id: <1476467276-75094-5-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476467276-75094-1-git-send-email-lina.iyer@linaro.org> References: <1476467276-75094-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 Save the fwnode for the genpd state in the state node. PM Domain clients may use the fwnode to read in the platform specific domain state properties and associate them with the state. Signed-off-by: Lina Iyer Acked-by: Ulf Hansson --- drivers/base/power/domain.c | 1 + include/linux/pm_domain.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 9af75ba..1a6073aa 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1956,6 +1956,7 @@ static int genpd_parse_state(struct genpd_power_state *genpd_state, genpd_state->power_on_latency_ns = 1000 * exit_latency; genpd_state->power_off_latency_ns = 1000 * entry_latency; + genpd_state->fwnode = &state_node->fwnode; return 0; } diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index b489496..6a89881 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -39,6 +39,7 @@ struct genpd_power_state { s64 power_off_latency_ns; s64 power_on_latency_ns; s64 residency_ns; + struct fwnode_handle *fwnode; }; struct generic_pm_domain {