Date: Sat, 13 Jan 2001 02:43:39 +0900 From: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org> To: current@freebsd.org, hackers@freebsd.org Subject: Re: CFR: Generalized power-management interface Message-ID: <20010113024339Z.iwasaki@jp.FreeBSD.org> In-Reply-To: <20001231180216L.iwasaki@jp.FreeBSD.org> References: <20001231180216L.iwasaki@jp.FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, I've update the patch based on some comments so far and added wmpm (actually ACPI support for wmapm which is utility for WindowMaker) ports files as a example. http://people.freebsd.org/~iwasaki/acpi/power-20010113.tar.gz http://people.freebsd.org/~iwasaki/acpi/wmpm-20010113.tar.gz Note that ioctl number for power device have been changed, so rebuilding your kernel and recompiling lib/libpower/ and usr.sbin/power/ are needed. Added API is; u_int power_get_pm_type(void); I'll get device major number for /dev/power and commit them within a few days if no objection. Thanks > 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?20010113024339Z.iwasaki>