diff options
| author | Daasaradhi Mannava <daasaradhimannava@gmail.com> | 2026-09-16 17:48:12 +0000 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2026-10-13 12:02:59 +0300 |
| commit | a102207eaf4a18c60c2ffbdc421ad3d30bfed591 (patch) | |
| tree | 375ef613a9e074d01362010aa59fd1e2254e4ce6 /tools/perf/scripts/python/bin | |
| parent | 2b89719f55f42ccbed219c4906e8c4ddfb117058 (diff) | |
platform/x86: msi-ec: Report valid charge thresholds when unset
The charge thresholds are computed by subtracting a fixed offset from
the raw EC value. When no charge limit has been set, the EC can hold a
value below range_min (0x80 on an MSI GL65 Leopard 9SCXK), and reading
the sysfs attributes returns nonsense:
charge_control_start_threshold: -10
charge_control_end_threshold: 0
Both attributes are documented to be within 0 - 100, and an end
threshold of 0 wrongly suggests that charging is disabled.
The store path already rejects values outside range_min..range_max.
Apply the same range to the show path and report the maximum threshold
for any value outside of it.
Tested on an MSI GL65 Leopard 9SCXK (EC firmware 16U8EMS2.100) with
the EC holding 0x80: the attributes now read 90 and 100.
Fixes: 392cacf2aa10 ("platform/x86: Add new msi-ec driver")
Assisted-by: LLM
Signed-off-by: Daasaradhi Mannava <daasaradhimannava@gmail.com>
Link: https://patch.msgid.link/20260916174812.11496-1-daasaradhimannava@gmail.com
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')
0 files changed, 0 insertions, 0 deletions
