All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	Rafael Wysocki <rjw@rjwysocki.net>,
	"rob.herring@linaro.org" <rob.herring@linaro.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Nishanth Menon <nm@ti.com>, Stephen Boyd <sboyd@codeaurora.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Santosh Shilimkar <santosh.shilimkar@oracle.com>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>,
	Arnd Bergmann <arnd.bergmann@linaro.org>,
	Mike Turquette <mike.turquette@linaro.org>,
	"grant.likely@linaro.org" <grant.likely@linaro.org>,
	"kesavan.abhilash@gmail.com" <kesavan.abhilash@gmail.com>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	"k.chander@samsung.com" <k.chander@samsung.com>,
	"olof@lixom.net" <olof@lixom.net>,
	"ta.omasab@gmail.com" <ta.omasab@gmail.com>
Subject: Re: [RFC] cpufreq: Add "dvfs-method" binding to probe cpufreq drivers
Date: Wed, 26 Nov 2014 17:04:33 +0000	[thread overview]
Message-ID: <54760821.5020909@arm.com> (raw)
In-Reply-To: <5476071B.1060705@arm.com>



On 26/11/14 17:00, Sudeep Holla wrote:
> Hi Viresh,
>

[...]

>> diff --git a/Documentation/devicetree/bindings/cpufreq/drivers.txt b/Documentation/devicetree/bindings/cpufreq/drivers.txt
>> new file mode 100644
>> index 0000000..bd14917
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/cpufreq/drivers.txt
>> @@ -0,0 +1,53 @@
>> +Binding to select which cpufreq driver to register
>> +
>> +It is a generic DT binding for selecting which cpufreq-driver to register for
>> +any platform.
>> +
>> +The property  listed below must be defined under node /cpus/cpu@0 node. We don't
>> +support multiple CPUFreq driver currently for different cluster and so this
>> +information isn't required to be present in CPUs of all clusters.
>> +
>> +Required properties:
>> +- None
>> +
>> +Optional properties:
>> +- dvfs-method: CPUFreq driver to probe. For example: "arm-bL-cpufreq-dt",
>> +  "cpufreq-dt", etc
>> +
>
> You should manage this with compatible rather than a new property as
> it's not a real hardware property. IMHO Rob's suggestion[1] should work
> fine.
>
> IIUC, you can have the driver which create this platform device if DT
> has generic compatible unconditionally(e.g "cpufreq-dt" as you have
> chosen above). For all existing DT you can create a blacklist of
> compatibles to match(as it doesn't have the generic compatible) covering
> all the existing platforms using cpufreq-dt driver, there by you can
> even remove the platform device creating from multiple places.
> IMO something like the patch below should work(not tested, also
> late_initcall is used just to demonstrate the idea)
>
> Rob, please correct me if my understanding is wrong.
>
> Regards,
> Sudeep
>
> [1]
> http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/256191.html
>
> --->8
>
> diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
> index f657c571b18e..19a616e298e0 100644
> --- a/drivers/cpufreq/cpufreq-dt.c
> +++ b/drivers/cpufreq/cpufreq-dt.c
> @@ -387,6 +387,32 @@ static struct platform_driver dt_cpufreq_platdrv = {
>    };
>    module_platform_driver(dt_cpufreq_platdrv);
>
> +static const struct of_device_id compatible_machine_match[] = {
> +       /* All new machines must have the below compatible to use this
> driver */
> +       { .compatible = "cpufreq-generic-dt" },
> +       /* BLACKLIST of existing users of cpufreq-dt below */
> +       { .compatible = "samsung,exynos5420" },
> +       { .compatible = "samsung,exynos5800" },

Please ignore the above 2 compatible values in this context, I just
chose randomly 2 values but I now realize that there are big-little
platforms and might not use this driver :(

Regards,
Sudeep


  reply	other threads:[~2014-11-26 17:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26  8:46 [RFC] cpufreq: Add "dvfs-method" binding to probe cpufreq drivers Viresh Kumar
2014-11-26  8:49 ` Viresh Kumar
2014-11-26 16:34   ` santosh shilimkar
2014-11-27  5:14     ` Viresh Kumar
2014-11-30 20:04       ` santosh.shilimkar
2014-11-26 17:00 ` Sudeep Holla
2014-11-26 17:04   ` Sudeep Holla [this message]
2014-11-27  5:29   ` Viresh Kumar
2014-11-27  9:54     ` Sudeep Holla
2014-11-27 10:22       ` Viresh Kumar
2014-11-27 11:15         ` Sudeep Holla
2014-11-28  6:31           ` Viresh Kumar
2014-11-28 11:51             ` Sudeep Holla
2014-12-01  8:06               ` 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=54760821.5020909@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Lorenzo.Pieralisi@arm.com \
    --cc=arnd.bergmann@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=k.chander@samsung.com \
    --cc=kesavan.abhilash@gmail.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mike.turquette@linaro.org \
    --cc=nm@ti.com \
    --cc=olof@lixom.net \
    --cc=rjw@rjwysocki.net \
    --cc=rob.herring@linaro.org \
    --cc=santosh.shilimkar@oracle.com \
    --cc=sboyd@codeaurora.org \
    --cc=ta.omasab@gmail.com \
    --cc=viresh.kumar@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.