cpufreq_get()
I'm planing to add the cpufreq_get() in struct cpufreq_driver, but in a hardware fashion, eventually replacing the name by something more appropriate.
Rational:
- almost all drivers that I know (powernow-k7, speedstep-*, longrun, and Im looking the PPC version) can implement it, the only one that I am aware for which it is not possible is the ACPI performance IO driver.
- by accessing driver->cpufreq_get() via a sysfs, we can verify if the 3 mains governors works. Even for longrun, we can verify that the frequency is between min and max.
- we can compare /proc/cpuinfo with the result of cpufreq_get(), helping in debugging things.
- people may want to monitor the real frequency in their applet, so this help for having a more consistent API (google for wmlongrun, for example).
- It is required for the ARM architecture anyway.
Signature · 4 lines
Ducrot Bruno -- Which is worse: ignorance or apathy? -- Don't know. Don't care.
Quoted 3 lines · Ducrot Bruno
I'm planing to add the
cpufreq_get()in structcpufreq_driver, but in a hardware fashion, eventually replacing the name by something more appropriate.
I appreciate this suggestion.
Quoted 2 lines
Even for longrun, we
can verify that the frequency is between min and max.
For ->range() drivers [I intend to rename ->setpolicy() to ->range()], we should leave the ->get() function optional in case the speed isn't detectable.
Dominik
_______________________________________________
Cpufreq mailing list
[email protected]
http://www.linux.org.uk/mailman/listinfo/cpufreq
Quoted 6 lines · Dominik Brodowski
Quoted 3 lines · Ducrot Bruno
I'm planing to add the
cpufreq_get()in structcpufreq_driver, but in a hardware fashion, eventually replacing the name by something more appropriate.I appreciate this suggestion.
Fine.
Quoted 7 lines
Quoted 3 lines
Even for longrun, we
can verify that the frequency is between min and max.For ->range() drivers [I intend to rename ->setpolicy() to ->range()], we should leave the ->get() function optional in case the speed isn't detectable.
Anyway, this must be optional because the ACPI performance driver can't detect speed...
Signature · 4 lines
Ducrot Bruno -- Which is worse: ignorance or apathy? -- Don't know. Don't care.
Quoted 2 lines · Ducrot Bruno
Anyway, this must be optional because the ACPI performance driver can't detect speed...
The hardware variant, yes. But for ACPI we can return what the cpufreq core thinks the current speed is.
Dominik
_______________________________________________
Cpufreq mailing list
[email protected]
http://www.linux.org.uk/mailman/listinfo/cpufreq