mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +00:00 
			
		
		
		
	cpuidle: Add docstrings for properties requiring units
Unit info from comments on `struct cpuidle_state` definition in include/linux/cpuidle.h in Linux 4.9 source (see drivers/cpuidle/sysfs.c for the code that exposes that data to userspace)
This commit is contained in:
		@@ -61,16 +61,29 @@ 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
 | 
					    @property
 | 
				
			||||||
    @memoized
 | 
					    @memoized
 | 
				
			||||||
    def target_residency(self):
 | 
					    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')
 | 
					        return self.get('residency')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def enable(self):
 | 
					    def enable(self):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user