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.


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.


> 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to