2020-06-04 01:59:07

by Thara Gopinath

[permalink] [raw]
Subject: [PATCH v6 2/6] soc: qcom: rpmhpd: Introduce function to retrieve power domain performance state count

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

Signed-off-by: Thara Gopinath <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>
---
drivers/soc/qcom/rpmhpd.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c
index e72426221a69..a9c597143525 100644
--- a/drivers/soc/qcom/rpmhpd.c
+++ b/drivers/soc/qcom/rpmhpd.c
@@ -362,6 +362,13 @@ 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)
+{
+ struct rpmhpd *pd = domain_to_rpmhpd(domain);
+
+ return pd->level_count;
+}
+
static int rpmhpd_update_level_mapping(struct rpmhpd *rpmhpd)
{
int i;
@@ -450,6 +457,7 @@ 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.20.1


2020-06-16 09:25:07

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH v6 2/6] soc: qcom: rpmhpd: Introduce function to retrieve power domain performance state count

On Thu, 4 Jun 2020 at 03:53, Thara Gopinath <[email protected]> wrote:
>
> Populate .get_performance_state_count in genpd ops to retrieve the count of
> performance states supported by a rpmh power domain.
>
> Signed-off-by: Thara Gopinath <[email protected]>
> Reviewed-by: Bjorn Andersson <[email protected]>

Reviewed-by: Ulf Hansson <[email protected]>

Kind regards
Uffe


> ---
> drivers/soc/qcom/rpmhpd.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c
> index e72426221a69..a9c597143525 100644
> --- a/drivers/soc/qcom/rpmhpd.c
> +++ b/drivers/soc/qcom/rpmhpd.c
> @@ -362,6 +362,13 @@ 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)
> +{
> + struct rpmhpd *pd = domain_to_rpmhpd(domain);
> +
> + return pd->level_count;
> +}
> +
> static int rpmhpd_update_level_mapping(struct rpmhpd *rpmhpd)
> {
> int i;
> @@ -450,6 +457,7 @@ 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.20.1
>

2020-06-16 17:23:55

by Thara Gopinath

[permalink] [raw]
Subject: Re: [PATCH v6 2/6] soc: qcom: rpmhpd: Introduce function to retrieve power domain performance state count



On 6/16/20 5:21 AM, Ulf Hansson wrote:
> On Thu, 4 Jun 2020 at 03:53, Thara Gopinath <[email protected]> wrote:
>>
>> Populate .get_performance_state_count in genpd ops to retrieve the count of
>> performance states supported by a rpmh power domain.
>>
>> Signed-off-by: Thara Gopinath <[email protected]>
>> Reviewed-by: Bjorn Andersson <[email protected]>
>
> Reviewed-by: Ulf Hansson <[email protected]>

Thanks Ulf for all the reviews.
>
> Kind regards
> Uffe
>


--
Warm Regards
Thara