Date: Thu, 3 Jan 2019 01:39:23 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342712 - in stable: 11/sys/dev/acpica 12/sys/dev/acpica Message-ID: <201901030139.x031dNL9071175@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901030139.x031dNL9071175>