aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
diff options
context:
space:
mode:
authorPeter Marheine <[email protected]>2025-05-08 02:41:45 +0000
committerRafael J. Wysocki <[email protected]>2025-05-09 19:14:34 +0000
commit234f71555019d308c6bc6f98c78c5551cb8cd56a (patch)
treee860fd0578f53429d366b5cbe75a416158738943 /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
parentACPI: battery: Round capacity percengate to closest integer (diff)
downloadkernel-234f71555019d308c6bc6f98c78c5551cb8cd56a.tar.gz
kernel-234f71555019d308c6bc6f98c78c5551cb8cd56a.zip
ACPI: battery: negate current when discharging
The ACPI specification requires that battery rate is always positive, but the kernel ABI for POWER_SUPPLY_PROP_CURRENT_NOW (Documentation/ABI/testing/sysfs-class-power) specifies that it should be negative when a battery is discharging. When reporting CURRENT_NOW, massage the value to match the documented ABI. This only changes the sign of `current_now` and not `power_now` because documentation doesn't describe any particular meaning for `power_now` so leaving `power_now` unchanged is less likely to confuse userspace unnecessarily, whereas becoming consistent with the documented ABI is worth potentially confusing clients that read `current_now`. Signed-off-by: Peter Marheine <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions