Skip to content

RFC CPUFreq: create platform-dev for DT based cpufreq drivers

Arnd Bergmann linux-arm-kernel linux-devicetree linux-pm 1 version New

Get series with b4
b4 am 5607434.rlEIdu4yyh@wuerfel

Versions newest first

  1. v1 RFC Latest0 of 8 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 8 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC V1 0/8] CPUFreq: create platform-dev for DT based cpufreq drivers
Quoted 17 lines · On Monday 01 December 2014 18:59:20 Viresh Kumar wrote:
Quoted 1 line · Arnd Bergmann

Thanks a lot for working on this, we really need to figure it out one day!

:)

Quoted 11 lines

Your patches seem well-implemented, so if everybody thinks the general approach is the best solution, we should do that. From my point of view, there are two things I would do differently:

- In the DT binding, I would strongly prefer anything but the root compatible property as the key for the new platforms. Clearly we have to keep using it for the backwards-compatibility case, as you do, but I think there are more appropriate places to put it. Sorting from most favorite to least favorite, my list would be:
1. a new property in /cpus/
2. a new property each /cpus/cpu at ... node.

Quoted 5 lines

I did it this way earlier and named it dvfs-method but probably putting this into the /cpus/ node is far better. But then Sudeep asked to utilize compatible property only..

Are you fine with the name here? "dvfs-method"

No objection here, whatever makes sense to you.

Quoted 7 lines
Quoted 7 lines
(quoted diff) +7 -0
+static bool dt_cpufreq_available(void)
+{
+       struct device_node *node;
+       bool ret;
+
+       node = of_find_node_by_path("/cpus");
+       if (!node)
Quoted 8 lines

Review

Quoted 4 lines
(quoted diff) +4 -0
+               return 0;
+
+       /* the specific property needs to be debated */
+       ret = of_property_read_bool("linux,cpu-frequency-scaling");

How can this be a bool? We need to differentiate on which binding wants to go for arm-bl or cupfreq-dt or any other driver. So we surely need a string ?

I guess a string would be better here, the idea here was to have a different bool property per driver, which would also work.

Quoted 8 lines

Review static int dt_cpufreq_probe(struct platform_device *pdev) · line 371

Quoted 6 lines
(quoted diff) +0 -2
@@ -367,29 +404,19 @@ static int dt_cpufreq_probe(struct platform_device *pdev)
        if (!IS_ERR(cpu_reg))
                regulator_put(cpu_reg);
 
-       dt_cpufreq_driver.driver_data = dev_get_platdata(&pdev->dev);
-

We still need this, and its about how clocks are shared between CPUs.

I didn't see where this comes from. Who is setting up this platform data?

Arnd