Skip to content

Commit 0032ee3

Browse files
committed
--thermal: only show hard throttle as prochot
We don't use soft-throttle. Show that only with -vv Hard throttle is PROCHOT# from EC to CPU. Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent f98989c commit 0032ee3

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

EXAMPLES.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,7 @@ The sensor names are reported by the EC firmware:
491491
ddr_f75303@4d: 35 C
492492
peci-temp: 42 C
493493
APU Fan: 0 RPM
494-
AP Throttle Status
495-
Soft: false
496-
Hard: false
494+
EC PROCHOT#: deasserted
497495
```
498496

499497
## Check thermal thresholds

framework_lib/src/power.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,11 +523,16 @@ pub fn print_thermal(ec: &CrosEc) {
523523
}
524524
}
525525

526-
println!(" AP Throttle Status");
527526
if let Ok(throttle) = ec.get_ap_throttle_status() {
528-
println!(" Soft: {:?}", throttle.soft_ap_throttle == 1);
529-
println!(" Hard: {:?}", throttle.hard_ap_throttle == 1);
527+
if log_enabled!(Level::Info) {
528+
println!(" AP Throttle Status");
529+
println!(" Soft: {:?}", throttle.soft_ap_throttle == 1);
530+
println!(" Hard: {:?}", throttle.hard_ap_throttle == 1);
531+
} else {
532+
println!(" EC PROCHOT#: {}", if throttle.hard_ap_throttle == 1 { "asserted" } else {"deasserted"});
533+
}
530534
} else {
535+
println!(" AP Throttle Status");
531536
println!(" Unknown");
532537
}
533538
}

0 commit comments

Comments
 (0)