+ if (this->minFreq == 0) {
+ QString min = readSysFile( "devices/system/cpu/cpu0/cpufreq/scaling_min_freq" );
+ //check if avoid file exists (only on power kernel)
+ QFile file( "/sys/devices/system/cpu/cpu0/cpufreq/ondemand/avoid_frequencies" );
+ if (file.exists()) {
+ QString avoid = readSysFile( "devices/system/cpu/cpu0/cpufreq/ondemand/avoid_frequencies" );
+ QStringList avoidList = avoid.split( " " );
+
+ //check if min is in avoid_frequencies
+ for (int i = getScalingStep( min.toInt() ); i>0; --i) {
+ if (!avoidList.contains(min.setNum( getScalingFreq(i) ))) {
+ this->minFreq = min.toInt();
+ return this->minFreq;
+ }
+ }
+
+ //should not happen at all
+ this->minFreq = 125000;
+ return this->minFreq;
+ } else {
+ this->minFreq = min.toInt();
+ return this->minFreq;
+ }
+ } else {
+ return this->minFreq;
+ }