mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 10:10:46 +00:00
Merge pull request #79 from bjackman/cpuidle-additions
Cpuidle additions
This commit is contained in:
commit
689c478ca8
@ -61,13 +61,31 @@ class CpuidleState(object):
|
|||||||
@property
|
@property
|
||||||
@memoized
|
@memoized
|
||||||
def latency(self):
|
def latency(self):
|
||||||
|
"""Exit latency in uS"""
|
||||||
return self.get('latency')
|
return self.get('latency')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@memoized
|
@memoized
|
||||||
def power(self):
|
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')
|
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):
|
def enable(self):
|
||||||
self.set('disable', 0)
|
self.set('disable', 0)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user