All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thara Gopinath <thara.gopinath@linaro.org>
To: qualcomm-lt@lists.linaro.org, linux-pm@vger.kernel.org
Cc: bjorn.andersson@linaro.org, ulf.hansson@linaro.org,
	rnayak@codeaurora.org
Subject: [PATCH 2/4] soc: qcom: rpmhpd: Introduce function to retrieve power domain performance state count
Date: Fri,  9 Aug 2019 20:58:45 -0400	[thread overview]
Message-ID: <1565398727-23090-3-git-send-email-thara.gopinath@linaro.org> (raw)
In-Reply-To: <1565398727-23090-1-git-send-email-thara.gopinath@linaro.org>

Populate .get_performace_state_count in genpd ops to retrieve the count
of performance states supported by a rpmh power domain.

Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
---
 drivers/soc/qcom/rpmhpd.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c
index 5741ec3..c3ceffd 100644
--- a/drivers/soc/qcom/rpmhpd.c
+++ b/drivers/soc/qcom/rpmhpd.c
@@ -285,6 +285,15 @@ static unsigned int rpmhpd_get_performance_state(struct generic_pm_domain *genpd
 	return dev_pm_opp_get_level(opp);
 }
 
+static int rpmhpd_performance_states_count(struct generic_pm_domain *domain,
+					   unsigned int *count)
+{
+	struct rpmhpd *pd = domain_to_rpmhpd(domain);
+
+	*count = pd->level_count;
+	return 0;
+}
+
 static int rpmhpd_update_level_mapping(struct rpmhpd *rpmhpd)
 {
 	int i;
@@ -373,6 +382,8 @@ static int rpmhpd_probe(struct platform_device *pdev)
 		rpmhpds[i]->pd.power_on = rpmhpd_power_on;
 		rpmhpds[i]->pd.set_performance_state = rpmhpd_set_performance_state;
 		rpmhpds[i]->pd.opp_to_performance_state = rpmhpd_get_performance_state;
+		rpmhpds[i]->pd.get_performance_state_count =
+					rpmhpd_performance_states_count;
 		pm_genpd_init(&rpmhpds[i]->pd, NULL, true);
 
 		data->domains[i] = &rpmhpds[i]->pd;
-- 
2.1.4


  parent reply	other threads:[~2019-08-10  0:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-10  0:58 [PATCH 0/4] qcom: Model RPMH power domains as thermal cooling devices Thara Gopinath
2019-08-10  0:58 ` [PATCH 1/4] PM/Domains: Add support for retrieving genpd performance states information Thara Gopinath
2019-08-11  3:25   ` kbuild test robot
2019-08-11  4:03   ` kbuild test robot
2019-08-22 15:03   ` Ulf Hansson
2019-08-23 17:39     ` Thara Gopinath
2019-09-06 22:24     ` Thara Gopinath
2019-09-09  9:40       ` Ulf Hansson
2019-08-10  0:58 ` Thara Gopinath [this message]
2019-08-10  0:58 ` [PATCH 3/4] thermal: qcom: Add RPMHPD cooling device driver Thara Gopinath
2019-08-22 15:19   ` Ulf Hansson
2019-08-23 17:51     ` Thara Gopinath
2019-08-24  6:10   ` Bjorn Andersson
2019-08-27 10:42     ` Thara Gopinath
2019-08-28 19:22       ` Bjorn Andersson
2019-08-28 12:23   ` Zhang Rui
2019-09-06 15:05     ` Thara Gopinath
2019-08-10  0:58 ` [PATCH 4/4] arm64: dts: qcom: Extend AOSS RPMHPD node Thara Gopinath
2019-08-14 10:52 ` [PATCH 0/4] qcom: Model RPMH power domains as thermal cooling devices Daniel Lezcano
2019-08-15 13:09   ` Thara Gopinath
2019-08-24  6:00   ` Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1565398727-23090-3-git-send-email-thara.gopinath@linaro.org \
    --to=thara.gopinath@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=qualcomm-lt@lists.linaro.org \
    --cc=rnayak@codeaurora.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.