svn commit: r342712 - in stable: 11/sys/dev/acpica 12/sys/dev/acpica
John Baldwin
jhb at FreeBSD.org
Thu Jan 3 01:39:23 UTC 2019
Author: jhb
Date: Thu Jan 3 01:39:22 2019
New Revision: 342712
URL: https://svnweb.freebsd.org/changeset/base/342712
Log:
MFC 339899: Make battery emptying rate available as sysctl variable.
Curiously, the in-kernel routines always use the design voltage to
convert from mA to mW, but acpiconf in userland uses the current
voltage. As a result, this can report a different mW rate than
acpiconf.
Modified:
stable/12/sys/dev/acpica/acpi_battery.c
Directory Properties:
stable/12/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/11/sys/dev/acpica/acpi_battery.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/12/sys/dev/acpica/acpi_battery.c
==============================================================================
--- stable/12/sys/dev/acpica/acpi_battery.c Thu Jan 3 01:01:03 2019 (r342711)
+++ stable/12/sys/dev/acpica/acpi_battery.c Thu Jan 3 01:39:22 2019 (r342712)
@@ -487,6 +487,11 @@ acpi_battery_init(void)
"remaining time in minutes");
SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx,
SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
+ OID_AUTO, "rate", CTLTYPE_INT | CTLFLAG_RD,
+ &acpi_battery_battinfo.rate, 0, acpi_battery_sysctl, "I",
+ "present rate in mW");
+ SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx,
+ SYSCTL_CHILDREN(acpi_battery_sysctl_tree),
OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RD,
&acpi_battery_battinfo.state, 0, acpi_battery_sysctl, "I",
"current status flags");
More information about the svn-src-stable-12
mailing list