Date: Sun, 31 Dec 2000 18:02:16 +0900 From: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org> To: current@freebsd.org Cc: hackers@freebsd.org Subject: CFR: Generalized power-management interface Message-ID: <20001231180216L.iwasaki@jp.FreeBSD.org>
next in thread | raw e-mail | index | archive | help
Hi, I've created new common framework on generalized power-management interface for userland utilities. http://people.freebsd.org/~iwasaki/acpi/power-20001229.tar.gz This provides some PM APIs to APM applications, such as wmapm, so that these applications can be ported smoothly to use ACPI (power management portion). Currently following APIs are implemented; int power_get_syspm_info(struct power_syspm_info *); int power_get_batt_info(u_int, struct power_batt_info *); int power_standby(void); int power_suspend(void); int power_hibernate(void); And PM event notification mechanism is suggested to be implemented so far. Sample application is included in usr.sbin/power/ which is very similar to apm(8) but supports ACPI as well. usr.sbin/acpi/acpibatt/ is for displaying acpi_cmbat (ACPI Control Method Battery), can be used to verify that generalized power-management interface is working correctly. Note that many ACPI BIOS give us unknown battery remaining time when ac-line is plugged in. MIB 'hw.battery.full_charge_time' can be used to specify the full charged remaining time of batteries in minutes, like sysctl -w hw.battery.full_charge_time=60,60 for multiple number of batteries, or sysctl -w hw.battery.full_charge_time=120 for a battery installed. To test them, /dev/power is required as a device control file. % ls -l /dev/power crw-r--r-- 1 root wheel 210, 0 12/19 04:51 /dev/power I'll commit them at sometime early in coming century. Any comments would be appreciated. Thanks! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001231180216L.iwasaki>