power: pmic-voter: make debug status more parsable
The status debug property lists all of the voters, their enable and value status, and the effective result. Currently the status is presented on multiple lines which is difficult to parse. Change the format to be more parsable. Print each voter in the following format: VOTABLE: CLIENT: en=1 v=1000 Print a single summary line at the end in the following format: VOTABLE: effective=EFFECTIVE_CLIENT type=VOTABLE_TYPE v=1000 Change-Id: I0671cdd8e0911450bafe4869cb49cc48bd622a81 Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
This commit is contained in:
parent
a49bb61510
commit
0092e08d5c
1 changed files with 5 additions and 6 deletions
|
@ -519,11 +519,10 @@ static int show_votable_clients(struct seq_file *m, void *data)
|
|||
|
||||
lock_votable(votable);
|
||||
|
||||
seq_printf(m, "Votable %s:\n", votable->name);
|
||||
seq_puts(m, "clients:\n");
|
||||
for (i = 0; i < votable->num_clients; i++) {
|
||||
if (votable->client_strs[i]) {
|
||||
seq_printf(m, "%-15s:\t\ten=%d\t\tv=%d\n",
|
||||
seq_printf(m, "%s: %s:\t\t\ten=%d v=%d\n",
|
||||
votable->name,
|
||||
votable->client_strs[i],
|
||||
votable->votes[i].enabled,
|
||||
votable->votes[i].value);
|
||||
|
@ -542,11 +541,11 @@ static int show_votable_clients(struct seq_file *m, void *data)
|
|||
break;
|
||||
}
|
||||
|
||||
seq_printf(m, "type: %s\n", type_str);
|
||||
seq_puts(m, "Effective:\n");
|
||||
effective_client_str = get_effective_client_locked(votable);
|
||||
seq_printf(m, "%-15s:\t\tv=%d\n",
|
||||
seq_printf(m, "%s: effective=%s type=%s v=%d\n",
|
||||
votable->name,
|
||||
effective_client_str ? effective_client_str : "none",
|
||||
type_str,
|
||||
get_effective_result_locked(votable));
|
||||
unlock_votable(votable);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue