From patchwork Fri Oct 7 22:36:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 9367793 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 B9153600C8 for ; Fri, 7 Oct 2016 22:40:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAB1229776 for ; Fri, 7 Oct 2016 22:40:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC918297F8; Fri, 7 Oct 2016 22:40:37 +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=ham 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 4B09E29776 for ; Fri, 7 Oct 2016 22:40:37 +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 1bsdn5-0002IM-34; Fri, 07 Oct 2016 22:38:55 +0000 Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bsdlq-0001nY-H2 for linux-arm-kernel@lists.infradead.org; Fri, 07 Oct 2016 22:37:40 +0000 Received: by mail-pf0-x22b.google.com with SMTP id 128so10580518pfz.2 for ; Fri, 07 Oct 2016 15:37:18 -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=XeNeHiIb8YlGRtSaCapfJW2tnTVAOayY4SR0HnnvKJw=; b=f19fw2X1E/r/b0mBhgOPseY469o8M1fvT8B9faNUOi5tkwoIanxm60DU+l3Fyn2k9v 2eg9+mokBihIXVSv0te8Meh89+dCM2jEd616Umnn1PEjHlkDMB/VIRGshgSgiNDOnRsJ KBg/Jzh+Hsi3T92T22sgumRBpkDyb6Mas4jcU= 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=XeNeHiIb8YlGRtSaCapfJW2tnTVAOayY4SR0HnnvKJw=; b=Wj9Z9D/XO6jznD8+iMpXb2Ms2Wi6ekEDSgYs8c7NDZgqbEiQFoqGpC/CgOnANoT6EB GjWGj3bdialXetEFknvvNG8/2vfw+y5Vx2Ud+EPDNdo+HrhNO8K/eJGURHtF3BiSOX97 jblUiLUWIsdcYjSyDYLcWuiXFZywlLD8mtDOZWTaCZATnVib345wmnd0VoaXtq+pLex+ 7axl/dm7bE0FgW0t1pdtXbYlUmamlamomByAdGBer08XKXhBzxbQ4crxW2MhNAF+FB32 4T+AQnHG+z8iFiHVPsLHpTC18Oiv4BUkpEKPbOC6UfCqvr/I61zksgU30nFE/sWO/Kdv 74mA== X-Gm-Message-State: AA6/9RmSmUP/1aGsq2GBSVjaoitpCjnv+VIpB8ci06KVmmU0OSu5bm2CPvVI97OVwz2M6HCi X-Received: by 10.98.2.215 with SMTP id 206mr31700158pfc.89.1475879837681; Fri, 07 Oct 2016 15:37:17 -0700 (PDT) Received: from ubuntu.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 4sm16409203pfw.90.2016.10.07.15.37.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Oct 2016 15:37:16 -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 v2 4/8] PM / Domains: Save the fwnode in genpd_power_state Date: Fri, 7 Oct 2016 15:36:57 -0700 Message-Id: <1475879821-8035-5-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475879821-8035-1-git-send-email-lina.iyer@linaro.org> References: <1475879821-8035-1-git-send-email-lina.iyer@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161007_153738_851437_9ED1EC09 X-CRM114-Status: GOOD ( 10.43 ) 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: 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 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 4208b67..e0f31fe 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1957,6 +1957,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 {