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: 77286 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp2987565qgf; Wed, 5 Oct 2016 13:32:21 -0700 (PDT) X-Received: by 10.67.16.76 with SMTP id fu12mr16210044pad.171.1475699541487; Wed, 05 Oct 2016 13:32:21 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8si49661889pfe.175.2016.10.05.13.32.21; Wed, 05 Oct 2016 13:32:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755055AbcJEUcP (ORCPT + 9 others); Wed, 5 Oct 2016 16:32:15 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:34243 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755050AbcJEUcO (ORCPT ); Wed, 5 Oct 2016 16:32:14 -0400 Received: by mail-pf0-f176.google.com with SMTP id e6so37076699pfk.1 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=k1CMkqST/PrIErVHWQcfSJ4qY4v0HtWOV4Hosb4ZrUxmMIL1KTUUC28lXwvybSs4v/ VGAsCoRszMJv+4Vfc2JyFgMVLXlUttt+Efl8LwiqgupIIARVlCsKSO6fSO16jTSqN5H8 3SeFyGD/XCv9w8Md979SP8tZQtPrN3O8PpKK07JGx5YY1w6Z/6yo9K1emx2bDfKXXDaC FDd5ykkaWWtuwyPbC/A6qD968r6MvOLQ5ZNDT6kZBWdXY7RTY8mU280zQI7IJy3e+vUs EB9GXdipDVkzsqvHqvigTvor2pQa2U5RgHOkEvXRbHwAZ4JmFFhrILHCLR8m4HGDFhV1 nn4A== X-Gm-Message-State: AA6/9RljWiQmEVF9TgHIZ24CvUhlP1VLJVpoqsL1z0kCBPUCPKrOOjFszYP/TLg6+OyOsu8t 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 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 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> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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(+) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 {