From patchwork Wed Oct 5 20:31:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lina Iyer X-Patchwork-Id: 9363387 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 B53696077E for ; Wed, 5 Oct 2016 20:34:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8A1628CDC for ; Wed, 5 Oct 2016 20:34:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D2FC28CE0; Wed, 5 Oct 2016 20:34:16 +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 37AD528CDC for ; Wed, 5 Oct 2016 20:34:16 +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 1brss8-0007Yw-00; Wed, 05 Oct 2016 20:33:00 +0000 Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1brsrd-0007PL-PA for linux-arm-kernel@lists.infradead.org; Wed, 05 Oct 2016 20:32:30 +0000 Received: by mail-pf0-x22a.google.com with SMTP id 190so46022938pfv.0 for ; Wed, 05 Oct 2016 13:32:14 -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=AmGlKQW2+9+SLQVKqnzyrucEllvXN5VealLtv53DqJY=; b=jd4N6MXjvFdj4AKQfLcbzQB6clsLFBMszllLP0VGrzb9JOrccIQb/T/rqcNCB5MNw6 YRbrAOHMVuJ8/kJheWderzQwCjviwr2NJ6GRCp1JFZXF5GasbZrojMYGGbJ5iTFSuLAH SAXNoI09cnTwKCOPhWw3X+3UCiud0LEHtkX74= 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=AmGlKQW2+9+SLQVKqnzyrucEllvXN5VealLtv53DqJY=; b=H4C8FAwotr/rqV0SwFQtmFvIIA+6ppxH78W+kD94P46j07C+/Q0DOwBFziQ0cRR8Lc 5KnBmN+Lbb1OOwAxFJ91xvVgQRWlR8JjgpjvpCTNJFwoAm2XbukacrX9iAEvi7wjvLFa zF90swHG4NmbOekHzxVW8i3J+SUHX/YvkGxXPFEZ7H/SjKo1uuobSxrTKcXBYpfam1qE /HRaz03Au6a1B2WwABCsC2X3U5UbDuGT8oLBGd953DvBhxDnP9tlYvAwzwBkFeoyezg3 DySm7vr8jzZcj9NWLVU3D/ptzVhVC8+GiAGVvi7UysVphxgXbyaVHg7Wh4UZ/kqYpl2t ILVA== X-Gm-Message-State: AA6/9Rl1qLzdRvtKkaOOtXCrI/4WoGR7vgGVBiH72f0otkXzuMvIJoM6b+iYaGiYwfRJ7erK X-Received: by 10.98.31.10 with SMTP id f10mr11665384pff.137.1475699533685; Wed, 05 Oct 2016 13:32:13 -0700 (PDT) Received: from ubuntu.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id s80sm42999467pfd.10.2016.10.05.13.32.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Oct 2016 13:32:12 -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 4/8] PM / Domains: Add fwnode provider to genpd states Date: Wed, 5 Oct 2016 14:31:55 -0600 Message-Id: <1475699519-109623-5-git-send-email-lina.iyer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475699519-109623-1-git-send-email-lina.iyer@linaro.org> References: <1475699519-109623-1-git-send-email-lina.iyer@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161005_133229_934947_ABEE50C7 X-CRM114-Status: GOOD ( 11.21 ) 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 rest of the properties for the domain state. Signed-off-by: Lina Iyer --- 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 368a5b8..52fcdb2 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1937,6 +1937,7 @@ static int read_genpd_state(struct genpd_power_state *genpd_state, latency = entry_latency + exit_latency; genpd_state->power_on_latency_ns = 1000 * latency; genpd_state->power_off_latency_ns = 1000 * entry_latency; + genpd_state->provider = &state_node->fwnode; return 0; } diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 4c9152d..eacfa71 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 *provider; }; struct generic_pm_domain {