From: Viresh Kumar <viresh.kumar@linaro.org>
To: Niklas Cassel <niklas.cassel@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>,
David Brown <david.brown@linaro.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-arm-msm@vger.kernel.org, jorge.ramirez-ortiz@linaro.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 4/9] cpufreq: qcom: support qcs404 on nvmem driver
Date: Tue, 9 Apr 2019 11:18:03 +0530 [thread overview]
Message-ID: <20190409054803.m24qucluqtxmd4vq@vireshk-i7> (raw)
In-Reply-To: <20190404050931.9812-5-niklas.cassel@linaro.org>
On 04-04-19, 07:09, Niklas Cassel wrote:
> From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
>
Always have something here, even for the simplest of the patches.
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> Co-developed-by: Niklas Cassel <niklas.cassel@linaro.org>
> Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
> ---
> drivers/cpufreq/qcom-cpufreq-nvmem.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c
> index 366c65a7132a..7fdc38218390 100644
> --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
> +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
> @@ -24,6 +24,7 @@
> #include <linux/of.h>
> #include <linux/of_device.h>
> #include <linux/platform_device.h>
> +#include <linux/pm_domain.h>
> #include <linux/pm_opp.h>
> #include <linux/slab.h>
> #include <linux/soc/qcom/smem.h>
> @@ -79,6 +80,13 @@ static enum _msm8996_version qcom_cpufreq_get_msm_id(void)
> return version;
> }
>
> +static int qcom_cpufreq_qcs404_name_version(struct device *cpu_dev,
> + struct nvmem_cell *speedbin_nvmem,
> + struct qcom_cpufreq_drv *drv)
> +{
> + return 0;
> +}
> +
Why provide empty stubs? Rather check for get_version() in probe and call only
if it is supported.
> static int qcom_cpufreq_kryo_name_version(struct device *cpu_dev,
> struct nvmem_cell *speedbin_nvmem,
> struct qcom_cpufreq_drv *drv)
> @@ -191,6 +199,14 @@ static int qcom_cpufreq_probe(struct platform_device *pdev)
> dev_err(cpu_dev, "Failed to set supported hardware\n");
> goto free_opp;
> }
> +
> + ret = dev_pm_domain_attach(cpu_dev, false);
Why is it required specially for this platform and not earlier ?
And I was hoping for the attach-by-name thing to be present here instead because
of multiple domain thing.
> + if (ret) {
> + if (ret == -EPROBE_DEFER)
> + goto free_opp;
> + dev_err(cpu_dev, "Could not attach to pm_domain: %d\n",
> + ret);
And it is okay if we couldn't attach the domain ?
> + }
> }
>
> cpufreq_dt_pdev = platform_device_register_simple("cpufreq-dt", -1,
> @@ -247,6 +263,8 @@ static const struct of_device_id qcom_cpufreq_match_list[] __initconst = {
> .data = qcom_cpufreq_kryo_name_version },
> { .compatible = "qcom,msm8996",
> .data = qcom_cpufreq_kryo_name_version },
> + { .compatible = "qcom,qcs404",
> + .data = qcom_cpufreq_qcs404_name_version },
> {},
> };
>
> --
> 2.20.1
--
viresh
next prev parent reply other threads:[~2019-04-09 5:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 5:09 [RFC PATCH 0/9] Add support for QCOM Core Power Reduction Niklas Cassel
2019-04-04 5:09 ` [RFC PATCH 2/9] cpufreq: qcom: Re-organise kryo cpufreq to use it for other nvmem based qcom socs Niklas Cassel
2019-04-06 6:07 ` Rob Herring
2019-04-06 6:07 ` Rob Herring
2019-04-08 7:04 ` Sricharan R
2019-04-08 7:04 ` Sricharan R
2019-04-08 10:44 ` Viresh Kumar
2019-04-08 10:44 ` Viresh Kumar
2019-04-04 5:09 ` [RFC PATCH 3/9] cpufreq: qcom: create a driver struct Niklas Cassel
2019-04-09 5:42 ` Viresh Kumar
2019-04-09 5:42 ` Viresh Kumar
2019-04-04 5:09 ` [RFC PATCH 4/9] cpufreq: qcom: support qcs404 on nvmem driver Niklas Cassel
2019-04-09 5:48 ` Viresh Kumar [this message]
2019-04-09 5:48 ` Viresh Kumar
2019-04-04 5:09 ` [RFC PATCH 5/9] cpufreq: Add qcs404 to cpufreq-dt-platdev blacklist Niklas Cassel
2019-04-04 5:09 ` [RFC PATCH 6/9] dt-bindings: opp: Add qcom-opp bindings with properties needed for CPR Niklas Cassel
2019-04-09 9:23 ` Viresh Kumar
2019-04-09 9:23 ` Viresh Kumar
2019-07-05 10:56 ` Niklas Cassel
2019-04-04 5:09 ` [RFC PATCH 8/9] power: avs: Add support for CPR (Core Power Reduction) Niklas Cassel
2019-04-08 10:30 ` [RFC PATCH 0/9] Add support for QCOM Core Power Reduction Viresh Kumar
2019-04-08 10:30 ` Viresh Kumar
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=20190409054803.m24qucluqtxmd4vq@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=andy.gross@linaro.org \
--cc=david.brown@linaro.org \
--cc=jorge.ramirez-ortiz@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=niklas.cassel@linaro.org \
--cc=rjw@rjwysocki.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).