1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-03 11:52:36 +01:00

Implementing dynamic device modules

Dynamic modules may be loaded automatically on device initialization if
the device supports them. Dynamic modules implent probe() method to
determine whether they are supported by a particular deviced.

devcpufreq and cpuidle have been converted into dynamic modules
This commit is contained in:
Sergei Trofimov
2015-06-18 09:42:40 +01:00
parent 73d85c2b4e
commit d9f45db71e
5 changed files with 80 additions and 23 deletions

View File

@@ -28,6 +28,10 @@ class CpufreqModule(Module):
"""
capabilities = ['cpufreq']
def probe(self, device): # pylint: disable=no-self-use
path = '/sys/devices/system/cpu/cpufreq'
return device.file_exists(path)
def initialize(self, context):
# pylint: disable=W0201
CpufreqModule._available_governors = {}