@@ -156,14 +156,14 @@ def _InitCache(device):
156156 int (i ) for i in available_frequencies .strip ().split ())
157157 else :
158158 # It's possibly an older kernel. In that case, query the min/max instead.
159- cpuinfo_min_freq = device .PullContent (
160- '/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq ' )
161- cpuinfo_max_freq = device .PullContent (
162- '/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq ' )
163- if cpuinfo_min_freq and cpuinfo_max_freq :
159+ scaling_min_freq = device .PullContent (
160+ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq ' )
161+ scaling_max_freq = device .PullContent (
162+ '/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq ' )
163+ if scaling_min_freq and scaling_max_freq :
164164 # In practice there's more CPU speeds than this but there's no way (?)
165165 # to query this information.
166- available_frequencies = [int (cpuinfo_min_freq ), int (cpuinfo_max_freq )]
166+ available_frequencies = [int (scaling_min_freq ), int (scaling_max_freq )]
167167
168168 cache = DeviceCache (
169169 properties , external_storage_path , has_su ,
@@ -193,12 +193,12 @@ def _InitCache(device):
193193 # there isn't much load.
194194 'ondemand' ,
195195 # performance locks the CPU frequency at its maximum supported frequency; it
196- # is the equivalent of userspace at cpuinfo_max_freq . On a ARM based device
196+ # is the equivalent of userspace at scaling_max_freq . On a ARM based device
197197 # without active cooling, this means that eventually the CPU will hit
198198 # temperature based throttling.
199199 'performance' ,
200200 # powersave locks the CPU frequency to its lowest supported frequency; it is
201- # the equivalent of userspace at cpuinfo_min_freq .
201+ # the equivalent of userspace at scaling_min_freq .
202202 'powersave' ,
203203 # userspace overrides the scaling governor with an user defined constant
204204 # frequency.
0 commit comments