Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) =======================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) Power Capping Framework
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) =======================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) The power capping framework provides a consistent interface between the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) and the user space that allows power capping drivers to expose the settings to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) user space in a uniform way.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) Terminology
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) The framework exposes power capping devices to user space via sysfs in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) form of a tree of objects. The objects at the root level of the tree represent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 'control types', which correspond to different methods of power capping.  For
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) example, the intel-rapl control type represents the Intel "Running Average
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) Power Limit" (RAPL) technology, whereas the 'idle-injection' control type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) corresponds to the use of idle injection for controlling power.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) Power zones represent different parts of the system, which can be controlled and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) monitored using the power capping method determined by the control type the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) given zone belongs to. They each contain attributes for monitoring power, as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) well as controls represented in the form of power constraints.  If the parts of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) the system represented by different power zones are hierarchical (that is, one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) bigger part consists of multiple smaller parts that each have their own power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) controls), those power zones may also be organized in a hierarchy with one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) parent power zone containing multiple subzones and so on to reflect the power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) control topology of the system.  In that case, it is possible to apply power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) capping to a set of devices together using the parent power zone and if more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) fine grained control is required, it can be applied through the subzones.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) Example sysfs interface tree::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34)   /sys/devices/virtual/powercap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35)   └──intel-rapl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36)       ├──intel-rapl:0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37)       │   ├──constraint_0_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38)       │   ├──constraint_0_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39)       │   ├──constraint_0_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40)       │   ├──constraint_1_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41)       │   ├──constraint_1_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42)       │   ├──constraint_1_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43)       │   ├──device -> ../../intel-rapl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44)       │   ├──energy_uj
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45)       │   ├──intel-rapl:0:0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46)       │   │   ├──constraint_0_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47)       │   │   ├──constraint_0_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48)       │   │   ├──constraint_0_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49)       │   │   ├──constraint_1_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50)       │   │   ├──constraint_1_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51)       │   │   ├──constraint_1_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52)       │   │   ├──device -> ../../intel-rapl:0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53)       │   │   ├──energy_uj
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)       │   │   ├──max_energy_range_uj
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55)       │   │   ├──name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56)       │   │   ├──enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57)       │   │   ├──power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58)       │   │   │   ├──async
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59)       │   │   │   []
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60)       │   │   ├──subsystem -> ../../../../../../class/power_cap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61)       │   │   └──uevent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62)       │   ├──intel-rapl:0:1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63)       │   │   ├──constraint_0_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64)       │   │   ├──constraint_0_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65)       │   │   ├──constraint_0_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66)       │   │   ├──constraint_1_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67)       │   │   ├──constraint_1_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68)       │   │   ├──constraint_1_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69)       │   │   ├──device -> ../../intel-rapl:0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70)       │   │   ├──energy_uj
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71)       │   │   ├──max_energy_range_uj
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)       │   │   ├──name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73)       │   │   ├──enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)       │   │   ├──power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)       │   │   │   ├──async
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76)       │   │   │   []
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77)       │   │   ├──subsystem -> ../../../../../../class/power_cap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78)       │   │   └──uevent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79)       │   ├──max_energy_range_uj
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80)       │   ├──max_power_range_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81)       │   ├──name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82)       │   ├──enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83)       │   ├──power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84)       │   │   ├──async
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85)       │   │   []
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86)       │   ├──subsystem -> ../../../../../class/power_cap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87)       │   ├──enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88)       │   ├──uevent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89)       ├──intel-rapl:1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90)       │   ├──constraint_0_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91)       │   ├──constraint_0_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)       │   ├──constraint_0_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93)       │   ├──constraint_1_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94)       │   ├──constraint_1_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95)       │   ├──constraint_1_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96)       │   ├──device -> ../../intel-rapl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97)       │   ├──energy_uj
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98)       │   ├──intel-rapl:1:0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99)       │   │   ├──constraint_0_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)       │   │   ├──constraint_0_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)       │   │   ├──constraint_0_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)       │   │   ├──constraint_1_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)       │   │   ├──constraint_1_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)       │   │   ├──constraint_1_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)       │   │   ├──device -> ../../intel-rapl:1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)       │   │   ├──energy_uj
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)       │   │   ├──max_energy_range_uj
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)       │   │   ├──name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)       │   │   ├──enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)       │   │   ├──power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)       │   │   │   ├──async
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)       │   │   │   []
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)       │   │   ├──subsystem -> ../../../../../../class/power_cap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)       │   │   └──uevent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)       │   ├──intel-rapl:1:1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)       │   │   ├──constraint_0_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)       │   │   ├──constraint_0_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)       │   │   ├──constraint_0_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119)       │   │   ├──constraint_1_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)       │   │   ├──constraint_1_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)       │   │   ├──constraint_1_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)       │   │   ├──device -> ../../intel-rapl:1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)       │   │   ├──energy_uj
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)       │   │   ├──max_energy_range_uj
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)       │   │   ├──name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)       │   │   ├──enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)       │   │   ├──power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)       │   │   │   ├──async
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)       │   │   │   []
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)       │   │   ├──subsystem -> ../../../../../../class/power_cap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)       │   │   └──uevent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)       │   ├──max_energy_range_uj
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)       │   ├──max_power_range_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)       │   ├──name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)       │   ├──enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)       │   ├──power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)       │   │   ├──async
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)       │   │   []
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)       │   ├──subsystem -> ../../../../../class/power_cap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)       │   ├──uevent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)       ├──power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)       │   ├──async
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)       │   []
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)       ├──subsystem -> ../../../../class/power_cap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)       ├──enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146)       └──uevent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) The above example illustrates a case in which the Intel RAPL technology,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) available in Intel® IA-64 and IA-32 Processor Architectures, is used. There is one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) control type called intel-rapl which contains two power zones, intel-rapl:0 and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) intel-rapl:1, representing CPU packages.  Each of these power zones contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) two subzones, intel-rapl:j:0 and intel-rapl:j:1 (j = 0, 1), representing the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) "core" and the "uncore" parts of the given CPU package, respectively.  All of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) the zones and subzones contain energy monitoring attributes (energy_uj,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) max_energy_range_uj) and constraint attributes (constraint_*) allowing controls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) to be applied (the constraints in the 'package' power zones apply to the whole
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) CPU packages and the subzone constraints only apply to the respective parts of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) the given package individually). Since Intel RAPL doesn't provide instantaneous
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) power value, there is no power_uw attribute.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) In addition to that, each power zone contains a name attribute, allowing the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) part of the system represented by that zone to be identified.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) For example::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	cat /sys/class/power_cap/intel-rapl/intel-rapl:0/name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) package-0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) ---------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) Depending on different power zones, the Intel RAPL technology allows
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) one or multiple constraints like short term, long term and peak power,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) with different time windows to be applied to each power zone.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) All the zones contain attributes representing the constraint names,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) power limits and the sizes of the time windows. Note that time window
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) is not applicable to peak power. Here, constraint_j_* attributes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) correspond to the jth constraint (j = 0,1,2).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) For example::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	constraint_0_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	constraint_0_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	constraint_0_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	constraint_1_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	constraint_1_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	constraint_1_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	constraint_2_name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	constraint_2_power_limit_uw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	constraint_2_time_window_us
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) Power Zone Attributes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) =====================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) Monitoring attributes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) ---------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) energy_uj (rw)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	Current energy counter in micro joules. Write "0" to reset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	If the counter can not be reset, then this attribute is read only.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) max_energy_range_uj (ro)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	Range of the above energy counter in micro-joules.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) power_uw (ro)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	Current power in micro watts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) max_power_range_uw (ro)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	Range of the above power value in micro-watts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) name (ro)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	Name of this power zone.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) It is possible that some domains have both power ranges and energy counter ranges;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) however, only one is mandatory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) Constraints
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) constraint_X_power_limit_uw (rw)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	Power limit in micro watts, which should be applicable for the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	time window specified by "constraint_X_time_window_us".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) constraint_X_time_window_us (rw)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 	Time window in micro seconds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) constraint_X_name (ro)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	An optional name of the constraint
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) constraint_X_max_power_uw(ro)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	Maximum allowed power in micro watts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) constraint_X_min_power_uw(ro)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 	Minimum allowed power in micro watts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) constraint_X_max_time_window_us(ro)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 	Maximum allowed time window in micro seconds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) constraint_X_min_time_window_us(ro)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 	Minimum allowed time window in micro seconds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) Except power_limit_uw and time_window_us other fields are optional.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) Common zone and control type attributes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) ---------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) enabled (rw): Enable/Disable controls at zone level or for all zones using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) a control type.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) Power Cap Client Driver Interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) =================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) The API summary:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) Call powercap_register_control_type() to register control type object.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) Call powercap_register_zone() to register a power zone (under a given
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) control type), either as a top-level power zone or as a subzone of another
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) power zone registered earlier.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) The number of constraints in a power zone and the corresponding callbacks have
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) to be defined prior to calling powercap_register_zone() to register that zone.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) To Free a power zone call powercap_unregister_zone().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) To free a control type object call powercap_unregister_control_type().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) Detailed API can be generated using kernel-doc on include/linux/powercap.h.