Move ACPI battery information from /proc/acpi to /sys

Authored by l10n daemon script <scripty@kde.org> on Nov 29 2019, 1:48 PM.

Description

Move ACPI battery information from /proc/acpi to /sys

Summary:
Since kernel 2.6.24 in 2008, the /proc/acpi/battery interface is deprecated.
There is for years no updated kernel which wouldn't provide the /sys/class/power_supply/BAT0 in a laptop
This patch removes the useless old path, and uses the sysfs to provide 3 informations :

  • current flow in mA (charge or discharge)
  • charge percent against last completed full charge
  • charge percent against battery by design charge

Ref:
https://cateee.net/lkddb/web-lkddb/ACPI_PROCFS_POWER.html
https://bbs.archlinux.org/viewtopic.php?id=97761

Reviewers: davidedmundson, Plasma, ahiemstra

Reviewed By: ahiemstra

Subscribers: alexde, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D25018