LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Rajendra Nayak <rnayak@codeaurora.org>
To: Sibi Sankar <sibis@codeaurora.org>,
	bjorn.andersson@linaro.org, robh+dt@kernel.org,
	andy.gross@linaro.org
Cc: david.brown@linaro.org, mark.rutland@arm.com,
	linux-kernel@vger.kernel.org,
	linux-arm-msm-owner@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/9] soc: qcom: rpmpd: Add support to set rpmpd state to max
Date: Mon, 25 Mar 2019 09:36:19 +0530
Message-ID: <696866e5-740a-f7b0-5193-f79b5c1e908c@codeaurora.org> (raw)
In-Reply-To: <20190324175007.29040-3-sibis@codeaurora.org>

On 3/24/2019 11:20 PM, Sibi Sankar wrote:
> Add support to set rpmpd state to max across SoCs.

Changelog could be better, 'rpmpd max state varies across SoCs
and SoC families, add support in the driver to make it SoC/SoC
family specific'

> 
> Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
> ---
>   drivers/soc/qcom/rpmpd.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
> index 235d01870dd8..71fdfafad2ea 100644
> --- a/drivers/soc/qcom/rpmpd.c
> +++ b/drivers/soc/qcom/rpmpd.c
> @@ -83,12 +83,14 @@ struct rpmpd {
>   	const int res_type;
>   	const int res_id;
>   	struct qcom_smd_rpm *rpm;
> +	unsigned int max_state;
>   	__le32 key;
>   };
>   
>   struct rpmpd_desc {
>   	struct rpmpd **rpmpds;
>   	size_t num_pds;
> +	unsigned int max_state;
>   };
>   
>   static DEFINE_MUTEX(rpmpd_lock);
> @@ -114,6 +116,7 @@ static struct rpmpd *msm8996_rpmpds[] = {
>   static const struct rpmpd_desc msm8996_desc = {
>   	.rpmpds = msm8996_rpmpds,
>   	.num_pds = ARRAY_SIZE(msm8996_rpmpds),
> +	.max_state = MAX_RPMPD_STATE,

Maybe this needs to be renamed to avoid confusion, MAX_8996_RPMPD_STATE?

>   };
>   
>   static const struct of_device_id rpmpd_match_table[] = {
> @@ -225,8 +228,8 @@ static int rpmpd_set_performance(struct generic_pm_domain *domain,
>   	int ret = 0;
>   	struct rpmpd *pd = domain_to_rpmpd(domain);
>   
> -	if (state > MAX_RPMPD_STATE)
> -		state = MAX_RPMPD_STATE;
> +	if (state > pd->max_state)
> +		state = pd->max_state;
>   
>   	mutex_lock(&rpmpd_lock);
>   
> @@ -287,6 +290,7 @@ static int rpmpd_probe(struct platform_device *pdev)
>   		}
>   
>   		rpmpds[i]->rpm = rpm;
> +		rpmpds[i]->max_state = desc->max_state;
>   		rpmpds[i]->pd.power_off = rpmpd_power_off;
>   		rpmpds[i]->pd.power_on = rpmpd_power_on;
>   		rpmpds[i]->pd.set_performance_state = rpmpd_set_performance;
> 

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

  reply index

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-24 17:49 [PATCH v2 0/9] RPMPD for QCS404 and MSM8998 Sibi Sankar
2019-03-24 17:49 ` [PATCH v2 1/9] soc: qcom: rpmpd: fixup rpmpd set performance state Sibi Sankar
2019-03-25  4:03   ` Rajendra Nayak
2019-03-27 13:26     ` Sibi Sankar
2019-03-24 17:50 ` [PATCH v2 2/9] soc: qcom: rpmpd: Add support to set rpmpd state to max Sibi Sankar
2019-03-25  4:06   ` Rajendra Nayak [this message]
2019-03-27 13:27     ` Sibi Sankar
2019-03-24 17:50 ` [PATCH v2 3/9] soc: qcom: rpmpd: Modify corner defining macros Sibi Sankar
2019-03-25  4:07   ` Rajendra Nayak
2019-03-27 13:28     ` Sibi Sankar
2019-03-24 17:50 ` [PATCH v2 4/9] dt-bindings: power: Add rpm power domain bindings for qcs404 Sibi Sankar
2019-03-25  4:21   ` Rajendra Nayak
2019-03-27 13:25     ` Sibi Sankar
2019-03-24 17:50 ` [PATCH v2 5/9] soc: qcom: rpmpd: Add QCS404 power-domains Sibi Sankar
2019-03-24 17:50 ` [PATCH v2 6/9] arm64: dts: qcom: qcs404: Add rpmpd node Sibi Sankar
2019-03-24 17:50 ` [PATCH v2 7/9] dt-bindings: power: Add rpm power domain bindings for msm8998 Sibi Sankar
2019-03-24 17:50 ` [PATCH v2 8/9] soc: qcom: rpmpd: Add MSM8998 power-domains Sibi Sankar
2019-03-24 17:50 ` [PATCH v2 9/9] arm64: dts: qcom: msm8998: Add rpmpd node Sibi Sankar

Reply instructions:

You may reply publically 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=696866e5-740a-f7b0-5193-f79b5c1e908c@codeaurora.org \
    --to=rnayak@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm-owner@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sibis@codeaurora.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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox