All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Valentin <eduardo.valentin@ti.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: Nishanth Menon <nm@ti.com>, Kevin Hilman <khilman@linaro.org>,
	Mark Langsdorf <mark.langsdorf@calxeda.com>,
	Shawn Guo <shawn.guo@linaro.org>,
	Rob Herring <robherring2@gmail.com>,
	Tony Lindgren <tony@atomide.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	linux-pm@vger.kernel.org, eduardo.valentin@ti.com
Subject: Re: omap cpufreq driver in multi-platform kernels
Date: Mon, 1 Apr 2013 13:20:58 -0400	[thread overview]
Message-ID: <5159C1FA.8090000@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1303302156180.6436@utopia.booyaka.com>

Hey Paul,

On 30-03-2013 18:21, Paul Walmsley wrote:
> Hi folks,
>
> On Wed, 27 Mar 2013, Nishanth Menon wrote:
>
>> On 10:53-20130327, Kevin Hilman wrote:
>>> Nishanth Menon <nm@ti.com> writes:
>>>> On 11:38-20130327, Rob Herring wrote:
>>>>> On 03/27/2013 08:32 AM, Nishanth Menon wrote:
>>>>>> On 02:23-20130327, Paul Walmsley wrote:
>>>>>>> On Tue, 26 Mar 2013, Rob Herring wrote:
>>>>>>>>
>>>>>>>> Converting the driver to a platform driver would be another option.
>>>
>>> I think the platform_device conversion is the way to go.  I think you
>>> should do that instead of PATCH 8/8 of your OMAP conversion to the
>>> generic driver[1].
>>
>> Yep, thinking about this over lunch, I came to the same conclusion that
>> instead of checking on DT node existance, platform_device conversion
>> will solve both parts of the puzzle.
>
> Looked at this a little today.  I see that the platform_driver CPUFreq
> driver approach was taken with several SoCs in mainline. Could someone
> explain the theory behind making the CPUFreq drivers platform_drivers,
> rather than just modules?
>
> The part that doesn't make sense to me is that the existing CPUFreq
> drivers don't represent an actual hardware block.  Conceptually, they
> aren't drivers for the CPU, nor are they drivers for a CPU frequency
> scaling IP block.  One might as well bind a CPUIdle driver or a CPU
> throttling thermal driver to the CPU device.

I do agree with your point. On the other hand, I'd like to make a 
clarification here.

CPU throttling feature not really done as a driver. The feature is 
exported to be used by policies built by other code. Check 
drivers/thermal/cpu_cooling.c.

Thermal drivers are in fact drivers, as they are bound to an actual 
hardware block, a bandgap, a thermal sensor or a thermistor.



>
> Wouldn't it be best to just make them modules?

Thermal policies are built as modules.


>
> Also, noticed that the Highbank CPUFreq driver creates a virtual device in
> its code.  That also doesn't seem right.  Isn't device creation better
> left to DT/ACPI/whatever?
>
>
> regards,
>
> - Paul
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>


WARNING: multiple messages have this Message-ID (diff)
From: eduardo.valentin@ti.com (Eduardo Valentin)
To: linux-arm-kernel@lists.infradead.org
Subject: omap cpufreq driver in multi-platform kernels
Date: Mon, 1 Apr 2013 13:20:58 -0400	[thread overview]
Message-ID: <5159C1FA.8090000@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1303302156180.6436@utopia.booyaka.com>

Hey Paul,

On 30-03-2013 18:21, Paul Walmsley wrote:
> Hi folks,
>
> On Wed, 27 Mar 2013, Nishanth Menon wrote:
>
>> On 10:53-20130327, Kevin Hilman wrote:
>>> Nishanth Menon <nm@ti.com> writes:
>>>> On 11:38-20130327, Rob Herring wrote:
>>>>> On 03/27/2013 08:32 AM, Nishanth Menon wrote:
>>>>>> On 02:23-20130327, Paul Walmsley wrote:
>>>>>>> On Tue, 26 Mar 2013, Rob Herring wrote:
>>>>>>>>
>>>>>>>> Converting the driver to a platform driver would be another option.
>>>
>>> I think the platform_device conversion is the way to go.  I think you
>>> should do that instead of PATCH 8/8 of your OMAP conversion to the
>>> generic driver[1].
>>
>> Yep, thinking about this over lunch, I came to the same conclusion that
>> instead of checking on DT node existance, platform_device conversion
>> will solve both parts of the puzzle.
>
> Looked at this a little today.  I see that the platform_driver CPUFreq
> driver approach was taken with several SoCs in mainline. Could someone
> explain the theory behind making the CPUFreq drivers platform_drivers,
> rather than just modules?
>
> The part that doesn't make sense to me is that the existing CPUFreq
> drivers don't represent an actual hardware block.  Conceptually, they
> aren't drivers for the CPU, nor are they drivers for a CPU frequency
> scaling IP block.  One might as well bind a CPUIdle driver or a CPU
> throttling thermal driver to the CPU device.

I do agree with your point. On the other hand, I'd like to make a 
clarification here.

CPU throttling feature not really done as a driver. The feature is 
exported to be used by policies built by other code. Check 
drivers/thermal/cpu_cooling.c.

Thermal drivers are in fact drivers, as they are bound to an actual 
hardware block, a bandgap, a thermal sensor or a thermistor.



>
> Wouldn't it be best to just make them modules?

Thermal policies are built as modules.


>
> Also, noticed that the Highbank CPUFreq driver creates a virtual device in
> its code.  That also doesn't seem right.  Isn't device creation better
> left to DT/ACPI/whatever?
>
>
> regards,
>
> - Paul
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>

  reply	other threads:[~2013-04-01 17:21 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27  1:49 omap cpufreq driver in multi-platform kernels Rob Herring
2013-03-27  1:49 ` Rob Herring
2013-03-27  2:23 ` Paul Walmsley
2013-03-27  2:23   ` Paul Walmsley
2013-03-27 13:32   ` Nishanth Menon
2013-03-27 13:32     ` Nishanth Menon
2013-03-27 16:38     ` Rob Herring
2013-03-27 16:38       ` Rob Herring
2013-03-27 17:02       ` Nishanth Menon
2013-03-27 17:02         ` Nishanth Menon
2013-03-27 17:53         ` Kevin Hilman
2013-03-27 17:53           ` Kevin Hilman
2013-03-27 17:56           ` Nishanth Menon
2013-03-27 17:56             ` Nishanth Menon
2013-03-30 22:21             ` Paul Walmsley
2013-03-30 22:21               ` Paul Walmsley
2013-04-01 17:20               ` Eduardo Valentin [this message]
2013-04-01 17:20                 ` Eduardo Valentin
2013-04-01 19:14                 ` Nishanth Menon
2013-04-01 19:14                   ` Nishanth Menon
2013-04-01 19:27                 ` Paul Walmsley
2013-04-01 19:27                   ` Paul Walmsley
2013-04-01 19:46               ` Rob Herring
2013-04-01 19:46                 ` Rob Herring
2013-04-01 21:58                 ` Paul Walmsley
2013-04-01 21:58                   ` Paul Walmsley
2013-03-27 17:48     ` Paul Walmsley
2013-03-27 17:48       ` Paul Walmsley
2013-03-27 18:02       ` Nishanth Menon
2013-03-27 18:02         ` Nishanth Menon

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=5159C1FA.8090000@ti.com \
    --to=eduardo.valentin@ti.com \
    --cc=khilman@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.langsdorf@calxeda.com \
    --cc=nm@ti.com \
    --cc=paul@pwsan.com \
    --cc=robherring2@gmail.com \
    --cc=shawn.guo@linaro.org \
    --cc=tony@atomide.com \
    /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.