Lines Matching +full:in +full:- +full:functions
5 (C) 2009-2010 Nishanth Menon <nm@ti.com>, Texas Instruments Incorporated
11 3. OPP Search Functions
12 4. OPP Availability Control Functions
13 5. OPP Data Retrieval Functions
20 -------------------------------------------------
22 Complex SoCs of today consists of a multiple sub-modules working in conjunction.
23 In an operational system executing varied use cases, not all modules in the SoC
25 facilitate this, sub-modules in a SoC are grouped into domains, allowing some
41 - {300000000, 1000000}
42 - {800000000, 1200000}
43 - {1000000000, 1300000}
46 ----------------------------------------
48 OPP library provides a set of helper functions to organize and query the OPP
49 information. The library is located in drivers/opp/ directory and the header
50 is located in include/linux/pm_opp.h. OPP library can be enabled by enabling
57 (users) -> registers a set of default OPPs -> (library)
58 SoC framework -> modifies on required cases certain OPPs -> OPP layer
59 -> queries to search/retrieve information ->
65 enabled by default in the system.
74 operations until that OPP could be re-enabled if possible.
76 OPP library facilitates this concept in its implementation. The following
77 operational functions operate only on available opps:
82 which can then be used for dev_pm_opp_enable/disable functions to make an
86 get_opp_count if dev_pm_opp_enable/disable functions are invoked for a
90 to be taken care to refresh the cpufreq table in cases of these operations.
96 optimally- typical numbers range to be less than 5. The list generated by
99 OPPs dynamically using the dev_pm_opp_enable / disable functions.
105 with the dev_pm_opp_enable/disable functions. OPP library
106 internally stores and manages this information in the dev_pm_opp struct.
111 Do not use this function in interrupt context.
128 3. OPP Search Functions
131 frequency back to the corresponding OPP, OPP library provides handy functions
133 functions return the matching pointer representing the opp if a match is
137 Callers of these functions shall call dev_pm_opp_put() after they have used the
138 OPP. Otherwise the memory for the OPP will never get freed and result in
145 Example: In a case when SoC framework detects a situation where a
167 match OR operating on OPP information in the order of decreasing
178 higher match OR operating on OPP information in the order of increasing
186 Example 2: A simplified implementation of a SoC cpufreq_driver->target::
201 4. OPP Availability Control Functions
204 situation. The OPP library provides a set of functions to modify the
207 These functions are intended to *temporarily* remove an OPP in conditions such
211 Do not use these functions in interrupt context.
247 5. OPP Data Retrieval Functions
249 Since OPP library abstracts away the OPP information, a set of functions to pull
251 retrieved using the search functions, the following functions can be used by SoC
274 Example: Lets say the SoC framework uses a couple of helper functions
293 return -EINVAL;
295 return -EINVAL;
301 Example: Lets say a co-processor in the SoC needs to know the available
302 frequencies in a table, the main processor can notify as following::
309 /* populate the table in increasing order */
329 |- device 1
330 | |- opp 1 (availability, freq, voltage)
331 | |- opp 2 ..
333 | `- opp n ..
334 |- device 2
336 `- device m
339 accessed by various functions as described above. However, the structures
345 represent an OPP. In addition to the freq, voltage, availability
349 identifier for OPP in the interactions with OPP layer.
355 by dev_pm_opp_enable/disable functions.
362 Overall, in a simplistic view, the data structure operations is represented as
366 +-----+ /- dev_pm_opp_enable
367 dev_pm_opp_add --> | opp | <-------
368 | +-----+ \- dev_pm_opp_disable
369 \-------> domain_info(device)
371 Search functions:
372 /-- dev_pm_opp_find_freq_ceil ---\ +-----+
373 domain_info<---- dev_pm_opp_find_freq_exact -----> | opp |
374 \-- dev_pm_opp_find_freq_floor ---/ +-----+
376 Retrieval functions:
377 +-----+ /- dev_pm_opp_get_voltage
378 | opp | <---
379 +-----+ \- dev_pm_opp_get_freq
381 domain_info <- dev_pm_opp_get_opp_count