From patchwork Mon Oct 24 22:21:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 9393455 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 802C960231 for ; Mon, 24 Oct 2016 22:25:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F8E129120 for ; Mon, 24 Oct 2016 22:25:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61E2E2917D; Mon, 24 Oct 2016 22:25:33 +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 12FEB29174 for ; Mon, 24 Oct 2016 22:25:33 +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 1bynf6-0002IV-Qo; Mon, 24 Oct 2016 22:24:08 +0000 Received: from mail-pf0-x233.google.com ([2607:f8b0:400e:c00::233]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1byncq-0000jl-H7 for linux-arm-kernel@lists.infradead.org; Mon, 24 Oct 2016 22:21:50 +0000 Received: by mail-pf0-x233.google.com with SMTP id r16so105942937pfg.1 for ; Mon, 24 Oct 2016 15:21: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=rJ7cTEuzH0f3wTI9EyVChT6fGbjUbxjly890w5TeiME=; b=XRLRnHTEv9TowLI/LVNrCku8V/ttb+o2EnUf3OYIhz2719AOlh6FZsA8KAA33gM3L4 uCqXodYDx+l5qyK1f+Lpguv4w1jsXjTVCh98lOpoDBu/9lVgZM2Gx2lQZz23bvELKj6q n03D6Td4rIevcp9H5hUDGi8xR9mv2nU1ltzo8= 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=rJ7cTEuzH0f3wTI9EyVChT6fGbjUbxjly890w5TeiME=; b=cEAa1R9HjI8oPxNFtx6jFAS3BzmkviCAeo7ogmUHrnKKDfiaIDjw1wgY5DSobIdyRS bq7icx9vw/eXjZS0BRRXRKLlR4kjiQQKRTv9B9eJEJ6agbQF+U4n4gVyVbvzRHgDr9NI qdqB1MRtpXmav3vx/biO+4VdNl2QhXc+BJT7+AuvXVa9M2ifjIWw5u7NnBHth1hxR4k/ QyxOOcY6NcYFqYoTz/O+pCNGeB8eXXw27urZN4AMA6r+MKjDqAa9VF/T77L0898wZpbf bS6jSlzbznR15SVty/q7yrf+52w6gNxVbTjZoEDI390/iX/WWLza3OLeuyPCwqQ9yfg+ keaA== X-Gm-Message-State: ABUngvcNekR9EOAGm92Q+DKlAf5ylQ74m9PqMCqNUtoUWtfbS1B24O+9yE3YSVu7GNAPpRJr X-Received: by 10.99.108.130 with SMTP id h124mr27076514pgc.90.1477347687327; Mon, 24 Oct 2016 15:21:27 -0700 (PDT) Received: from ubuntu.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id x190sm27674408pfd.20.2016.10.24.15.21.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Oct 2016 15:21:26 -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 v4 6/9] PM / Domains: Save the fwnode in genpd_power_state Date: Mon, 24 Oct 2016 15:21:05 -0700 Message-Id: <1477347668-41901-7-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477347668-41901-1-git-send-email-lina.iyer@linaro.org> References: <1477347668-41901-1-git-send-email-lina.iyer@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161024_152148_787896_9A043D95 X-CRM114-Status: GOOD ( 10.51 ) 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 0e59f1d..f056c80 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 {