1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

Merge pull request #79 from bjackman/cpuidle-additions

Cpuidle additions
This commit is contained in:
setrofim 2016-12-07 17:46:44 +00:00 committed by GitHub
commit 689c478ca8

View File

@ -61,13 +61,31 @@ class CpuidleState(object):
@property
@memoized
def latency(self):
"""Exit latency in uS"""
return self.get('latency')
@property
@memoized
def power(self):
"""Power usage in mW
..note::
This value is not always populated by the kernel and may be garbage.
"""
return self.get('power')
@property
@memoized
def target_residency(self):
"""Target residency in uS
This is the amount of time in the state required to 'break even' on
power - the system should avoid entering the state for less time than
this.
"""
return self.get('residency')
def enable(self):
self.set('disable', 0)