Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup

2013-03-12 Thread Benoit Cousson
On 03/12/2013 03:43 PM, Nishanth Menon wrote:
> On 15:28-20130312, Benoit Cousson wrote:
>> On 03/12/2013 06:07 AM, Santosh Shilimkar wrote:
>>> On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
 commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
 now forces platform device to be registered for allowing cpufreq-cpu0
 to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c

 However, for SoCs that wish to link up using device tree, instead
 of platform device, provide compatibility string match:
 compatible = "cpufreq,cpu0";
>>
>> You cannot add a non-HW relative binding... DT is supposed to represent
>> the pure HW.
>> AFAIK, cpufreq has nothing to do with the HW definition.
> Ref:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/cpufreq/highbank-cpufreq.c#n61
> there is a need for a device of some sort.  in the example above, we
> register a dummy device for linking up with cpufreq-cpu0 driver.
> what we do in this patch is to indicate that SoC CPUs are managed by
> cpufreq-cpu0 driver.
> 
> I am a bit curious to see how else would we represent drivers to manage
> real h/w devices like CPU? Is the highbank style the recommended way to do
> things?

Yep, I don't think this is a very elegant way to do that, but until we
do have a generic DVFS layer, I'm not sure we have any other approach.
But maybe not.

The CPU is the real device, but AFAIK, nobody beside OMAP is
representing the CPU as the device.
But I'd rather use a CPU device than a fake CPUFREQ device.

Regards,
Benoit
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup

2013-03-12 Thread Nishanth Menon
On 15:28-20130312, Benoit Cousson wrote:
> On 03/12/2013 06:07 AM, Santosh Shilimkar wrote:
> > On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
> >> commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
> >> now forces platform device to be registered for allowing cpufreq-cpu0
> >> to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
> >>
> >> However, for SoCs that wish to link up using device tree, instead
> >> of platform device, provide compatibility string match:
> >> compatible = "cpufreq,cpu0";
> 
> You cannot add a non-HW relative binding... DT is supposed to represent
> the pure HW.
> AFAIK, cpufreq has nothing to do with the HW definition.
Ref:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/cpufreq/highbank-cpufreq.c#n61
there is a need for a device of some sort.  in the example above, we
register a dummy device for linking up with cpufreq-cpu0 driver.
what we do in this patch is to indicate that SoC CPUs are managed by
cpufreq-cpu0 driver.

I am a bit curious to see how else would we represent drivers to manage
real h/w devices like CPU? Is the highbank style the recommended way to do
things?
> 
> >>
> >> Cc: "Rafael J. Wysocki" 
> >> Cc: Santosh Shilimkar 
> >> Cc: Shawn Guo 
> >> Cc: linux-kernel@vger.kernel.org
> >> Cc: cpuf...@vger.kernel.org
> >> Cc: linux...@vger.kernel.org
> >> Cc: linux-o...@vger.kernel.org
> >>
> >> Signed-off-by: Nishanth Menon 
> >> ---
> >>  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |3 +++
> >>  drivers/cpufreq/cpufreq-cpu0.c |6 ++
> >>  2 files changed, 9 insertions(+)
> >>
> > Looks fine to me. CC'ing dt list in case some one has
> > comments on binding updates.
> > 
> > Acked-by: Santosh Shilimkar 
> 
> Not-Acked-by-me.

-- 
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup

2013-03-12 Thread Santosh Shilimkar
On Tuesday 12 March 2013 07:58 PM, Benoit Cousson wrote:
> On 03/12/2013 06:07 AM, Santosh Shilimkar wrote:
>> On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
>>> commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
>>> now forces platform device to be registered for allowing cpufreq-cpu0
>>> to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
>>>
>>> However, for SoCs that wish to link up using device tree, instead
>>> of platform device, provide compatibility string match:
>>> compatible = "cpufreq,cpu0";
> 
> You cannot add a non-HW relative binding... DT is supposed to represent
> the pure HW.
> AFAIK, cpufreq has nothing to do with the HW definition.
> 
You are right. 

>>>
>>> Cc: "Rafael J. Wysocki" 
>>> Cc: Santosh Shilimkar 
>>> Cc: Shawn Guo 
>>> Cc: linux-kernel@vger.kernel.org
>>> Cc: cpuf...@vger.kernel.org
>>> Cc: linux...@vger.kernel.org
>>> Cc: linux-o...@vger.kernel.org
>>>
>>> Signed-off-by: Nishanth Menon 
>>> ---
>>>  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |3 +++
>>>  drivers/cpufreq/cpufreq-cpu0.c |6 ++
>>>  2 files changed, 9 insertions(+)
>>>
>> Looks fine to me. CC'ing dt list in case some one has
>> comments on binding updates.
>>
>> Acked-by: Santosh Shilimkar 
> 
> Not-Acked-by-me.
> 
I obviously missed the point while acking the patch.

Regards,
santosh


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup

2013-03-12 Thread Benoit Cousson
On 03/12/2013 06:07 AM, Santosh Shilimkar wrote:
> On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
>> commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
>> now forces platform device to be registered for allowing cpufreq-cpu0
>> to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
>>
>> However, for SoCs that wish to link up using device tree, instead
>> of platform device, provide compatibility string match:
>> compatible = "cpufreq,cpu0";

You cannot add a non-HW relative binding... DT is supposed to represent
the pure HW.
AFAIK, cpufreq has nothing to do with the HW definition.

>>
>> Cc: "Rafael J. Wysocki" 
>> Cc: Santosh Shilimkar 
>> Cc: Shawn Guo 
>> Cc: linux-kernel@vger.kernel.org
>> Cc: cpuf...@vger.kernel.org
>> Cc: linux...@vger.kernel.org
>> Cc: linux-o...@vger.kernel.org
>>
>> Signed-off-by: Nishanth Menon 
>> ---
>>  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |3 +++
>>  drivers/cpufreq/cpufreq-cpu0.c |6 ++
>>  2 files changed, 9 insertions(+)
>>
> Looks fine to me. CC'ing dt list in case some one has
> comments on binding updates.
> 
> Acked-by: Santosh Shilimkar 

Not-Acked-by-me.

Regards,
Benoit



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup

2013-03-12 Thread Shawn Guo
Copied devicetree-discuss list.

On Mon, Mar 11, 2013 at 06:05:30PM -0500, Nishanth Menon wrote:
> commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
> now forces platform device to be registered for allowing cpufreq-cpu0
> to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
> 
> However, for SoCs that wish to link up using device tree, instead
> of platform device, provide compatibility string match:
> compatible = "cpufreq,cpu0";

This compatible is merely added for asking DT core code to populate
a platform_device for cpufreq driver.  It's not describing
hardware/cpus, and it does not belong to device tree.

Shawn

> 
> Cc: "Rafael J. Wysocki" 
> Cc: Santosh Shilimkar 
> Cc: Shawn Guo 
> Cc: linux-kernel@vger.kernel.org
> Cc: cpuf...@vger.kernel.org
> Cc: linux...@vger.kernel.org
> Cc: linux-o...@vger.kernel.org
> 
> Signed-off-by: Nishanth Menon 
> ---
>  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |3 +++
>  drivers/cpufreq/cpufreq-cpu0.c |6 ++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt 
> b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
> index f180963..a5699f0 100644
> --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
> @@ -10,6 +10,8 @@ under node /cpus/cpu@0.
>  Required properties:
>  - operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt
>for details
> +- compatible: if platform_device is *not* used, should be:
> +  "cpufreq,cpu0"
>  
>  Optional properties:
>  - clock-name: If the clock is not converted to device tree, then describe
> @@ -24,6 +26,7 @@ Examples:
>  cpus {
>   #address-cells = <1>;
>   #size-cells = <0>;
> + compatible = "cpufreq,cpu0";
>  
>   cpu@0 {
>   compatible = "arm,cortex-a9";
> diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
> index 28223c9..a6f0a9b 100644
> --- a/drivers/cpufreq/cpufreq-cpu0.c
> +++ b/drivers/cpufreq/cpufreq-cpu0.c
> @@ -277,9 +277,15 @@ static int cpu0_cpufreq_remove(struct platform_device 
> *pdev)
>   return 0;
>  }
>  
> +static struct of_device_id of_cpu0_cpufreq_match[] = {
> + { .compatible = "cpufreq,cpu0", },
> + { /* end */ }
> +};
> +
>  static struct platform_driver cpu0_cpufreq_platdrv = {
>   .driver = {
>   .name   = "cpufreq-cpu0",
> + .of_match_table = of_cpu0_cpufreq_match,
>   .owner  = THIS_MODULE,
>   },
>   .probe  = cpu0_cpufreq_probe,
> -- 
> 1.7.9.5
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup

2013-03-12 Thread Santosh Shilimkar
On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
> commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
> now forces platform device to be registered for allowing cpufreq-cpu0
> to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
> 
> However, for SoCs that wish to link up using device tree, instead
> of platform device, provide compatibility string match:
> compatible = "cpufreq,cpu0";
> 
> Cc: "Rafael J. Wysocki" 
> Cc: Santosh Shilimkar 
> Cc: Shawn Guo 
> Cc: linux-kernel@vger.kernel.org
> Cc: cpuf...@vger.kernel.org
> Cc: linux...@vger.kernel.org
> Cc: linux-o...@vger.kernel.org
> 
> Signed-off-by: Nishanth Menon 
> ---
>  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |3 +++
>  drivers/cpufreq/cpufreq-cpu0.c |6 ++
>  2 files changed, 9 insertions(+)
> 
Looks fine to me. CC'ing dt list in case some one has
comments on binding updates.

Acked-by: Santosh Shilimkar 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup

2013-03-12 Thread Santosh Shilimkar
On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
 commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
 now forces platform device to be registered for allowing cpufreq-cpu0
 to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
 
 However, for SoCs that wish to link up using device tree, instead
 of platform device, provide compatibility string match:
 compatible = cpufreq,cpu0;
 
 Cc: Rafael J. Wysocki r...@sisk.pl
 Cc: Santosh Shilimkar santosh.shilim...@ti.com
 Cc: Shawn Guo shawn@linaro.org
 Cc: linux-kernel@vger.kernel.org
 Cc: cpuf...@vger.kernel.org
 Cc: linux...@vger.kernel.org
 Cc: linux-o...@vger.kernel.org
 
 Signed-off-by: Nishanth Menon n...@ti.com
 ---
  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |3 +++
  drivers/cpufreq/cpufreq-cpu0.c |6 ++
  2 files changed, 9 insertions(+)
 
Looks fine to me. CC'ing dt list in case some one has
comments on binding updates.

Acked-by: Santosh Shilimkar santosh.shilim...@ti.com

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup

2013-03-12 Thread Shawn Guo
Copied devicetree-discuss list.

On Mon, Mar 11, 2013 at 06:05:30PM -0500, Nishanth Menon wrote:
 commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
 now forces platform device to be registered for allowing cpufreq-cpu0
 to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
 
 However, for SoCs that wish to link up using device tree, instead
 of platform device, provide compatibility string match:
 compatible = cpufreq,cpu0;

This compatible is merely added for asking DT core code to populate
a platform_device for cpufreq driver.  It's not describing
hardware/cpus, and it does not belong to device tree.

Shawn

 
 Cc: Rafael J. Wysocki r...@sisk.pl
 Cc: Santosh Shilimkar santosh.shilim...@ti.com
 Cc: Shawn Guo shawn@linaro.org
 Cc: linux-kernel@vger.kernel.org
 Cc: cpuf...@vger.kernel.org
 Cc: linux...@vger.kernel.org
 Cc: linux-o...@vger.kernel.org
 
 Signed-off-by: Nishanth Menon n...@ti.com
 ---
  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |3 +++
  drivers/cpufreq/cpufreq-cpu0.c |6 ++
  2 files changed, 9 insertions(+)
 
 diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt 
 b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
 index f180963..a5699f0 100644
 --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
 +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
 @@ -10,6 +10,8 @@ under node /cpus/cpu@0.
  Required properties:
  - operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt
for details
 +- compatible: if platform_device is *not* used, should be:
 +  cpufreq,cpu0
  
  Optional properties:
  - clock-name: If the clock is not converted to device tree, then describe
 @@ -24,6 +26,7 @@ Examples:
  cpus {
   #address-cells = 1;
   #size-cells = 0;
 + compatible = cpufreq,cpu0;
  
   cpu@0 {
   compatible = arm,cortex-a9;
 diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
 index 28223c9..a6f0a9b 100644
 --- a/drivers/cpufreq/cpufreq-cpu0.c
 +++ b/drivers/cpufreq/cpufreq-cpu0.c
 @@ -277,9 +277,15 @@ static int cpu0_cpufreq_remove(struct platform_device 
 *pdev)
   return 0;
  }
  
 +static struct of_device_id of_cpu0_cpufreq_match[] = {
 + { .compatible = cpufreq,cpu0, },
 + { /* end */ }
 +};
 +
  static struct platform_driver cpu0_cpufreq_platdrv = {
   .driver = {
   .name   = cpufreq-cpu0,
 + .of_match_table = of_cpu0_cpufreq_match,
   .owner  = THIS_MODULE,
   },
   .probe  = cpu0_cpufreq_probe,
 -- 
 1.7.9.5
 

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup

2013-03-12 Thread Benoit Cousson
On 03/12/2013 06:07 AM, Santosh Shilimkar wrote:
 On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
 commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
 now forces platform device to be registered for allowing cpufreq-cpu0
 to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c

 However, for SoCs that wish to link up using device tree, instead
 of platform device, provide compatibility string match:
 compatible = cpufreq,cpu0;

You cannot add a non-HW relative binding... DT is supposed to represent
the pure HW.
AFAIK, cpufreq has nothing to do with the HW definition.


 Cc: Rafael J. Wysocki r...@sisk.pl
 Cc: Santosh Shilimkar santosh.shilim...@ti.com
 Cc: Shawn Guo shawn@linaro.org
 Cc: linux-kernel@vger.kernel.org
 Cc: cpuf...@vger.kernel.org
 Cc: linux...@vger.kernel.org
 Cc: linux-o...@vger.kernel.org

 Signed-off-by: Nishanth Menon n...@ti.com
 ---
  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |3 +++
  drivers/cpufreq/cpufreq-cpu0.c |6 ++
  2 files changed, 9 insertions(+)

 Looks fine to me. CC'ing dt list in case some one has
 comments on binding updates.
 
 Acked-by: Santosh Shilimkar santosh.shilim...@ti.com

Not-Acked-by-me.

Regards,
Benoit



--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup

2013-03-12 Thread Santosh Shilimkar
On Tuesday 12 March 2013 07:58 PM, Benoit Cousson wrote:
 On 03/12/2013 06:07 AM, Santosh Shilimkar wrote:
 On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
 commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
 now forces platform device to be registered for allowing cpufreq-cpu0
 to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c

 However, for SoCs that wish to link up using device tree, instead
 of platform device, provide compatibility string match:
 compatible = cpufreq,cpu0;
 
 You cannot add a non-HW relative binding... DT is supposed to represent
 the pure HW.
 AFAIK, cpufreq has nothing to do with the HW definition.
 
You are right. 


 Cc: Rafael J. Wysocki r...@sisk.pl
 Cc: Santosh Shilimkar santosh.shilim...@ti.com
 Cc: Shawn Guo shawn@linaro.org
 Cc: linux-kernel@vger.kernel.org
 Cc: cpuf...@vger.kernel.org
 Cc: linux...@vger.kernel.org
 Cc: linux-o...@vger.kernel.org

 Signed-off-by: Nishanth Menon n...@ti.com
 ---
  .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |3 +++
  drivers/cpufreq/cpufreq-cpu0.c |6 ++
  2 files changed, 9 insertions(+)

 Looks fine to me. CC'ing dt list in case some one has
 comments on binding updates.

 Acked-by: Santosh Shilimkar santosh.shilim...@ti.com
 
 Not-Acked-by-me.
 
I obviously missed the point while acking the patch.

Regards,
santosh


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup

2013-03-12 Thread Nishanth Menon
On 15:28-20130312, Benoit Cousson wrote:
 On 03/12/2013 06:07 AM, Santosh Shilimkar wrote:
  On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
  commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
  now forces platform device to be registered for allowing cpufreq-cpu0
  to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c
 
  However, for SoCs that wish to link up using device tree, instead
  of platform device, provide compatibility string match:
  compatible = cpufreq,cpu0;
 
 You cannot add a non-HW relative binding... DT is supposed to represent
 the pure HW.
 AFAIK, cpufreq has nothing to do with the HW definition.
Ref:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/cpufreq/highbank-cpufreq.c#n61
there is a need for a device of some sort.  in the example above, we
register a dummy device for linking up with cpufreq-cpu0 driver.
what we do in this patch is to indicate that SoC CPUs are managed by
cpufreq-cpu0 driver.

I am a bit curious to see how else would we represent drivers to manage
real h/w devices like CPU? Is the highbank style the recommended way to do
things?
 
 
  Cc: Rafael J. Wysocki r...@sisk.pl
  Cc: Santosh Shilimkar santosh.shilim...@ti.com
  Cc: Shawn Guo shawn@linaro.org
  Cc: linux-kernel@vger.kernel.org
  Cc: cpuf...@vger.kernel.org
  Cc: linux...@vger.kernel.org
  Cc: linux-o...@vger.kernel.org
 
  Signed-off-by: Nishanth Menon n...@ti.com
  ---
   .../devicetree/bindings/cpufreq/cpufreq-cpu0.txt   |3 +++
   drivers/cpufreq/cpufreq-cpu0.c |6 ++
   2 files changed, 9 insertions(+)
 
  Looks fine to me. CC'ing dt list in case some one has
  comments on binding updates.
  
  Acked-by: Santosh Shilimkar santosh.shilim...@ti.com
 
 Not-Acked-by-me.

-- 
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] cpufreq: cpufreq-cpu0: provide compatibility string for DT matchup

2013-03-12 Thread Benoit Cousson
On 03/12/2013 03:43 PM, Nishanth Menon wrote:
 On 15:28-20130312, Benoit Cousson wrote:
 On 03/12/2013 06:07 AM, Santosh Shilimkar wrote:
 On Tuesday 12 March 2013 04:35 AM, Nishanth Menon wrote:
 commit 5553f9e (cpufreq: instantiate cpufreq-cpu0 as a platform_driver)
 now forces platform device to be registered for allowing cpufreq-cpu0
 to be used by SoCs. example: drivers/cpufreq/highbank-cpufreq.c

 However, for SoCs that wish to link up using device tree, instead
 of platform device, provide compatibility string match:
 compatible = cpufreq,cpu0;

 You cannot add a non-HW relative binding... DT is supposed to represent
 the pure HW.
 AFAIK, cpufreq has nothing to do with the HW definition.
 Ref:
 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/cpufreq/highbank-cpufreq.c#n61
 there is a need for a device of some sort.  in the example above, we
 register a dummy device for linking up with cpufreq-cpu0 driver.
 what we do in this patch is to indicate that SoC CPUs are managed by
 cpufreq-cpu0 driver.
 
 I am a bit curious to see how else would we represent drivers to manage
 real h/w devices like CPU? Is the highbank style the recommended way to do
 things?

Yep, I don't think this is a very elegant way to do that, but until we
do have a generic DVFS layer, I'm not sure we have any other approach.
But maybe not.

The CPU is the real device, but AFAIK, nobody beside OMAP is
representing the CPU as the device.
But I'd rather use a CPU device than a fake CPUFREQ device.

Regards,
Benoit
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/