Lines Matching refs:OPP
1 Operating Performance Points (OPP) Library
9 2. Initial OPP List Registration
10 3. OPP Search Functions
11 4. OPP Availability Control Functions
12 5. OPP Data Retrieval Functions
17 1.1 What is an Operating Performance Point (OPP)?
42 OPP library provides a set of helper functions to organize and query the OPP
44 is located in include/linux/pm_opp.h. OPP library can be enabled by enabling
45 CONFIG_PM_OPP from power management menuconfig menu. OPP library depends on
47 optionally boot at a certain OPP without needing cpufreq.
49 Typical usage of the OPP library is as follows:
51 SoC framework -> modifies on required cases certain OPPs -> OPP layer
54 OPP layer expects each domain to be represented by a unique device pointer. SoC
55 framework registers a set of initial OPPs per device with the OPP layer. This
60 Note on OPP Availability:
65 SoC framework might choose to disable a higher frequency OPP to safely continue
66 operations until that OPP could be re-enabled if possible.
68 OPP library facilitates this concept in it's implementation. The following
75 WARNING: Users of OPP library should refresh their availability count using
79 specific framework which uses the OPP library. Similar care needs to be taken
82 WARNING on OPP List locking mechanism:
84 OPP library uses RCU for exclusivity. RCU allows the query functions to operate
86 intensive operations on data structure as the OPP library caters to.
89 should ensure that the section of code operating on OPP queries are locked
98 2. Initial OPP List Registration
101 device. It is expected that the SoC framework will register the OPP entries
103 registering the OPPs is maintained by OPP library throughout the device
107 dev_pm_opp_add - Add a new OPP for a specific domain represented by the device pointer.
108 The OPP is defined using the frequency and voltage. Once added, the OPP
110 with the dev_pm_opp_enable/disable functions. OPP library internally stores
131 3. OPP Search Functions
134 frequency back to the corresponding OPP, OPP library provides handy functions
135 to search the OPP list that OPP library internally manages. These search
140 dev_pm_opp_find_freq_exact - Search for an OPP based on an *exact* frequency and
141 availability. This function is especially useful to enable an OPP which
145 find the OPP prior to call the dev_pm_opp_enable to actually make it available.
160 dev_pm_opp_find_freq_floor - Search for an available OPP which is *at most* the
162 match OR operating on OPP information in the order of decreasing
170 dev_pm_opp_find_freq_ceil - Search for an available OPP which is *at least* the
172 higher match OR operating on OPP information in the order of increasing
194 4. OPP Availability Control Functions
196 A default OPP list registered with the OPP library may not cater to all possible
197 situation. The OPP library provides a set of functions to modify the
198 availability of a OPP within the OPP list. This allows SoC frameworks to have
200 These functions are intended to *temporarily* remove an OPP in conditions such
205 dev_pm_opp_enable - Make a OPP available for operation.
206 Example: Lets say that 1GHz OPP is to be made available only if the
221 dev_pm_opp_disable - Make an OPP to be not available for operation
222 Example: Lets say that 1GHz OPP is to be disabled if the temperature
237 5. OPP Data Retrieval Functions
239 Since OPP library abstracts away the OPP information, a set of functions to pull
240 information from the OPP structure is necessary. Once an OPP pointer is
242 framework to retrieve the information represented inside the OPP layer.
246 framework requires to set the voltage represented by the OPP using
311 domain is represented by a device pointer. The relationship to OPP can be
323 OPP library maintains a internal list that the SoC framework populates and
325 representing the actual OPPs and domains are internal to the OPP library itself
328 struct dev_pm_opp - The internal data structure of OPP library which is used to
329 represent an OPP. In addition to the freq, voltage, availability
331 for the OPP library to operate on. Pointer to this structure is
333 identifier for OPP in the interactions with OPP layer.
337 availability of the OPP can be modified by dev_pm_opp_enable/disable functions.
339 struct device - This is used to identify a domain to the OPP layer. The
341 OPP library such as the SoC framework.