diff options
| author | Shang En Sim <sim@shangen.org> | 2026-09-30 22:10:12 -0500 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2026-10-14 12:30:39 +0300 |
| commit | 929433336e0a6e5014af7b8849f369712d2c8964 (patch) | |
| tree | 4cc3f955fcfb56997f3ba59236fa815c05ea4049 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 574245e62cb09e159b4c37e1a9091c100448b5c3 (diff) | |
platform/x86: hp-wmi: add charge_behaviour support for Spectre 8C15/8C17
HP Spectre x360 16-aa0xxx (board 8C17) exposes battery charge mode control
through WMI command 0x2b (GBCO/SBCO). Inhibit charge, force discharge, and
restoring automatic charging all work through that command. The
Spectre x360 14-eu0xxx (board 8C15) shares the same platform and the same
GBCO/SBCO implementation.
Unlike some other HP designs that restore automatic charging through WMI
command 0x1f (SBCC), that path fails on this BIOS. Keep the quirk limited
to boards 8C15 and 8C17 and drive all three behaviours through 0x2b only.
Expose auto / inhibit-charge / force-discharge through the standard
power_supply charge_behaviour property. Seed the reported policy from
GBCO at setup because firmware retains inhibit across reboot. Cache that
policy afterwards: GBCO also encodes live status, so 0x01 means actively
charging and 0x02 is ambiguous between force-discharge and running on
battery alone.
Observed firmware mapping on this board:
- write 0x00 -> auto; write 0x02 -> force-discharge; write 0x05 -> inhibit
- read 0x00/0x01 -> auto (0x01 = actively charging)
- read 0x02 -> force-discharge (also seen on battery alone)
- read 0x04/0x05/0x06 -> inhibit
Tested on HP Spectre x360 16-aa0xxx (board 8C17, BIOS F.16):
- inhibit stops charging on AC; GBCO reads 0x04
- force-discharge discharges on AC; GBCO reads 0x02
- restore-auto via 0x2b mode 0 resumes charging; GBCO reads 0x01
- inhibit persists across reboot (status Not charging, GBCO 0x04)
Board 8C15 was reported working by Alain Cousinie.
Suggested-by: Alain Cousinie <alain.cousinie@laposte.net>
Signed-off-by: Shang En Sim <sim@shangen.org>
Link: https://patch.msgid.link/20261001031012.48473-3-sim@shangen.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
