Subject: New IDE control program & changed to apmd
To: None <current-users@netbsd.org>
From: Ken Hornstein <kenh@cmf.nrl.navy.mil>
List: current-users
Date: 11/19/1998 14:59:03
I've just commited a few things that should make power management on
laptops much easier:

wdctl(8) - A program to manipulate WD/IDE/ATA disks, a la scsictl(8).
	   This uses a new ioctl I created called WDCIOCCOMMAND
	   (a la SCIOCCOMMAND).  With this command you can do things
	   like do an inquiry against your disks to find out
	   information about them and set the timers used for
	   spindown.

apmd	 - apmd has been changed to run two extra scripts called "line"
	   and "battery" upon power transitions to line power or battery
	   power.

With these two things you can now do things like only set the disk
spindown timer when you're on battery power.  Right now that is perhaps
the _only_ useful thing you can do, but I believe this framework is
general enough to allow other things to be done (once we figure out
what they are :-) ).

I've only tested wdctl(8) on the i386; I _believe_ it should work fine
on big-endian architectures (judging by my inspection of the wdc driver),
but I'd love to hear from people on other architectures about it.

Of course, apmd only applies to i386 AFAIK.

If you have questions or comments, please let me know.

--Ken