diff options
| author | Abhijeet Dharmapurikar <adharmap@codeaurora.org> | 2016-12-29 10:34:46 -0800 |
|---|---|---|
| committer | Abhijeet Dharmapurikar <adharmap@codeaurora.org> | 2017-01-04 18:52:44 -0800 |
| commit | 9c3c098aa2d2b119e537518b251da0577af4c9ee (patch) | |
| tree | 2e191435d0112a35dbe7c0b51890838f98da66e6 /tools/perf/scripts/python | |
| parent | 33eba0ae11ee6a1a9cef3969132e637724a780be (diff) | |
pmic-voter: Allow forcing a value via debug interface
Forcing a certain value on the result of the votable is a very
desireable feature to speed up debugging.
For this create a debugfs dir per votable and implement following debugfs
files
- status : This is the same as the earlier one which dumps clients and
their values and results.
- force_val : The value of the vote to force. This will be an integer
value for min/max votables and should be a boolean value
for set_any votables.
- force_active: This flag activates or deactives the force mode.
Note that writing to the force active flags always invokes the callback
when present even if the same value is being set. When activated the
callback is called with the result set to force_val and the client set to
"DEBUG_FORCE_CLIENT".
While activated, other clients are allowed to vote, their votes are
noted and the effective values tracked internally are updated. Only the
callback is skipped. This internal tracking of the effective values help
in switching back quickly to the voted results once the force mode is
deactivated IOW When deactivated the callback is called with the result
and client set to the effective ones which could have been the same as
the ones prior to force activation or could have been updated by
the calls to vote() while force was activte.
Also, note that while force is activated, the calls to
get_effective_result and get_effective_client return the force_val
and "FORCE_DEBUG_CLIENT" instead of the internal effective values. This
provides consistency with callback values.
Change-Id: Id9eb5b27675e3ed53176175c13e0d654783bcf08
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
