I`m writing a bash script to limit cpu frequency in case of over heating. I would like to do this by monitor the processor tempereture in file /sys/class/hwmon/hwmon0/temp2_input, and when the temperature is above 95°C limit temperature by limiting procressor frequency in files /sys/devices/system/cpu/cpu/cpufreq/scaling_max_freq*. The problem, which I’m facing is that there is no /sys/devices/system/cpu/cpu/cpufreq/* directories and files in my system. There is only /sys/devices/system/cpu/cpufreq directory, which is empty. The question is, if am I missing some kernel module or do I have to change the processor cores frequency in different way? Thank you in advance for your assistance.
If I good understand you have already implemented the cpufreq driver in your custom kernel? The question is, can I copy this driver from your kernel into mainline?
Thank you for your response. Due to lack of the cpu freq driver I`have decided to abandon limit cpu frequency via governor, and use cpulimit tool instead. I have made few tests, and it looks like this tool works good. Do you think, that this solution is safe for the processor without active cooling? Safe running environment is very important for us, because we are planning using hundreds of terminals based on apalis tegra T30 in different environments.