diff options
author | 2021-04-01 10:34:21 +0000 | |
---|---|---|
committer | 2021-04-01 10:34:21 +0000 | |
commit | 8706e35857510b21082a2e044b430d55f3cca478 (patch) | |
tree | 5796d291ca85d312b0cdabd5e9db562851ba8366 /gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/recursion | |
parent | merge NSD 4.3.6rc1 (diff) | |
download | wireguard-openbsd-8706e35857510b21082a2e044b430d55f3cca478.tar.xz wireguard-openbsd-8706e35857510b21082a2e044b430d55f3cca478.zip |
Hardcode meaningful alert level, track apm's battery state better
The current code looks for the nonexistent "cellwise,alert-level" property
and falls back to zero as threshold (like the original NetBSD code).
It also updates the CONFIG register with that very threshold to let the
hardware set a bit and thus alert us when it has been reached.
Since our sensor framework is designed to poll every N seconds and this
driver does not actually look at whether the hardware alerted, neither
using a default threshold of zero nor updating the hardware with it makes
sense.
Remove the alert level code and simply map >50%, >25% and <=25% of
remaining battery life to apm(4)'s "high", "low" and "critical" battery
state respectively; this matches exactly what acpibat(4) does and provides
more meaningful sensor readings without relying on nonexistent device tree
bindings.
Feedback OK patrick
Diffstat (limited to 'gnu/llvm/lldb/packages/Python/lldbsuite/test/functionalities/recursion')
0 files changed, 0 insertions, 0 deletions