diff options
author | Marco S Hyman <marc@cvs.openbsd.org> | 1998-07-27 23:14:13 +0000 |
---|---|---|
committer | Marco S Hyman <marc@cvs.openbsd.org> | 1998-07-27 23:14:13 +0000 |
commit | a01945e3640bc9bf65487670444b6d7ac7c752e9 (patch) | |
tree | 33bb8a568ff3c36047949e80409e45751e11755f /share | |
parent | ea732e0c9efda72635de9737c12729b65aba0487 (diff) |
add apm(4) man page
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man4/man4.i386/Makefile | 4 | ||||
-rw-r--r-- | share/man/man4/man4.i386/apm.4 | 229 | ||||
-rw-r--r-- | share/man/man4/man4.i386/intro.4 | 28 |
3 files changed, 246 insertions, 15 deletions
diff --git a/share/man/man4/man4.i386/Makefile b/share/man/man4/man4.i386/Makefile index 3c2ad2e34c8..1737a1a3b2a 100644 --- a/share/man/man4/man4.i386/Makefile +++ b/share/man/man4/man4.i386/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.18 1998/07/12 09:55:08 downsj Exp $ +# $OpenBSD: Makefile,v 1.19 1998/07/27 23:14:09 marc Exp $ # from: @(#)Makefile 5.1 (Berkeley) 2/12/91 # Id: Makefile,v 1.4 1995/12/14 05:41:38 deraadt Exp $ -MAN= intro.4 aha.4 ahb.4 aic.4 aria.4 ast.4 autoconf.4 boca.4 bt.4 +MAN= intro.4 aha.4 ahb.4 aic.4 apm.4 aria.4 ast.4 autoconf.4 boca.4 bt.4 MAN+= com.4 cy.4 ed.4 ep.4 fdc.4 iy.4 lms.4 lpt.4 mcd.4 mem.4 mms.4 MAN+= npx.4 pctr.4 pms.4 rtfps.4 scd.4 sea.4 speaker.4 uha.4 wdc.4 MAN+= eg.4 el.4 ie.4 joy.4 le.4 wt.4 diff --git a/share/man/man4/man4.i386/apm.4 b/share/man/man4/man4.i386/apm.4 new file mode 100644 index 00000000000..9df564966ca --- /dev/null +++ b/share/man/man4/man4.i386/apm.4 @@ -0,0 +1,229 @@ +.\" $OpenBSD: apm.4,v 1.1 1998/07/27 23:14:11 marc Exp $ +.\" +.\" Copyright (c) 1998 Marco S. Hyman +.\" +.\" Permission to copy all or part of this material for any purpose is +.\" granted provided that the above copyright notice and this paragraph +.\" are duplicated in all copies. THIS SOFTWARE IS PROVIDED ``AS IS'' +.\" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT +.\" LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +.\" FOR A PARTICULAR PURPOSE. +.\" +.Dd July 17, 1998 +.Dt APM 4 +.Os +.Sh NAME +.Nm apm +.Nd +advanced power management device interface +.Sh SYNOPSIS +.Cd apm0 at bios0 +.Sh DESCRIPTION +The +.Nm +driver provides an interface to the Advanced Power Management +.Pq Tn APM +.Tn BIOS +functions. The driver supports both the v1.0 and v1.1 interface +specifications. +.Pp +Configuration options: +.Pp +.Bl -tag -width APM_V10_ONLY -compact -offset indent +.It Dv APM_V10_ONLY +Disables support for version 1.1 of the +.Tn APM +.Tn BIOS +interface. +.It Dv APMDEBUG +Enable various driver status messages. +.It Dv DIAGNOSTIC +Enable debugging messages. +.It Dv DEBUG +Enable other debugging messages. +.El +.Pp +The +.Nm +driver implements the following +.Xr ioctl 2 +calls. They are defined in +.Aq Pa machine/apmvar.h . +.Pp +.Bl -tag -width APM_IOC_NEXTEVENT +.It Dv APM_IOC_REJECT +.Em Not implemented . DO NOT USE . +.It Dv APM_IOC_STANDBY +.Pq Li "no parameters" +Request +.Sq standby +mode. +.It Dv APM_IOC_SUSPEND +.Pq Li "no parameters" +Request +.Sq suspend +mode. +.It Dv APM_IOC_GETPOWER +.Pq Li "struct apm_power_info" +Request the current power state. The argument structure is as follows: +.Bd -literal -offset indent +struct apm_power_info { + u_char battery_state; + u_char ac_state; + u_char battery_life; + u_char spare1; + u_int minutes_left; + u_int spare2[6]; +}; +.Ed +The following values are defined for +.Va battery_state : +.Bl -tag -width APM_BATT_FLAG_NOBATTERY +.It Dv APM_BATT_HIGH +Battery has a high state of charge. +.It Dv APM_BATT_LOW +Battery has a low state of charge +.It Dv APM_BATT_CRITICAL +Battery +.It Dv APM_BATT_CHARGING +Battery is not high, low, or critical and is current charging. +.It Dv APM_BATT_UNKNOWN +Can not read the current battery state. +.It Dv APM_BATTERY_ABSENT +No battery installed. +.El +.Pp +The following values are defined for +.Va ac_state : +.Bl -tag -width APM_AC_UNKNOWN +.It Dv APM_AC_OFF +External power not detected. +.It Dv APM_AC_ON +External power detected. +.It Dv APM_AC_BACKUP +Backup power in use. +.It Dv APM_AC_UNKNOWN +External power state unknown. +.El +.Pp +The +.Va battery_life +value contains the estimated percentage of battery life available. +100% indicates a full charge. +.Pp +The +.Va minutes_left +value contains the estimated number of minutes of battery life +remaining. +.It Dv APM_IOC_NEXTEVENT +.Pq Li "struct apm_event_info" +The +.Tn APM +driver stores up to +.Dv APM_NEVENTS +events. This was defined as 16 at the time this documentation was written. +If the event list is full when a new event is detected the new event is +lost. +.Dv APM_IOC_NEXTEVENT +ioctl returns the next event on the list or +.Er EAGAIN +if the event list is empty. The format of the returned event is: +.Bd -literal -offset indent +struct apm_event_info { + u_int type; + u_int index; + u_int spare[8]; +}; +.Ed +where +.Va index +is a sequential count of events that can be used to check if any +events were lost and +.Va type +is one of: +.Bl -tag -compact -offset indent +.It Dv APM_STANDBY_REQ +.It Dv APM_SUSPEND_REQ +.It Dv APM_NORMAL_RESUME +.It Dv APM_CRIT_RESUME +.It Dv APM_BATTERY_LOW +.It Dv APM_POWER_CHANGE +.It Dv APM_UPDATE_TIME +.It Dv APM_CRIT_SUSPEND_REQ +.It Dv APM_USER_STANDBY_REQ +.It Dv APM_USER_SUSPEND_REQ +.It Dv APM_SYS_STANDBY_RESUME +.El +.It Dv APM_IOC_DEV_CTL +.Pq Li "struct apm_ctl" +Allows an application to directly set the +.Tm APM +operating mode. The argument structure is as follows: +.Bd -literal -offset indent +struct apm_ctl { + u_int dev; + u_int mode; +}; +.Ed +.Pp +.Va dev +indicates the device, typically +.Dv APM_DEV_ALLDEVS . +.Pp +.Va mode +indicates the desired operating mode. Possible values are +.Bl -tag -compact -offset indent +.It Dv APM_SYS_READY +.It Dv APM_SYS_STANDBY +.It Dv APM_SYS_SUSPEND +.It Dv APM_SYS_OFF +.It Dv APM_LASTREQ_INPROG +.It Dv APM_LASTREQ_REJECTED +.El +.It Dv APM_IOC_PRN_CTL +.Pq Li "int" +This +.Xr ioctl 2 +controls message output by the +.Tn APM +driver when a power change event is detected. The integer parameter is one +of: +.Bl -tag -width APM_PRINT_OFF +.It Dv APM_PRINT_ON +All power change events result in a message. This is the normal +operating mode for the driver. +.It Dv APM_PRINT_OFF +Power change event message are suppressed. +.It Dv APM_PRINT_PCT +Power change event message are suppressed unless the estimated +battery life percentage changes. +.El +.El +.Sh FILES +.Bl -tag -width /dev/apmctl -compat +.It Pa /dev/apm +.Tn APM +data device. May only be opened read-only. May be opened by multiple +concurrent users. +.It Pa /dev/apmctl +.Tn APM +control device. May be opened read-write or write-only. May only be +opened by a one user at a time. An attempt to open the file when in +use will fail, returning +.Er EBUSY . +.El +.Sh SEE ALSO +.Xr apm 8 , +.Xr apmd 8 , +.Nm http://developer.intel.com/ial/powermgm/apmv12.pdf +.Sh HISTORY +The +.Nm +driver source code contains these copyrights: +.Bl -item -compact +.It +.Li Copyright (c) 1995 John T. Kohl. All rights reserved. +.It +.Li Copyright (C) 1994 by HOSOKAWA Tatsumi <hosokawa@mt.cs.keio.ac.jp> +.El +and has been hacked on by many others since. diff --git a/share/man/man4/man4.i386/intro.4 b/share/man/man4/man4.i386/intro.4 index 3d11a85e3a8..3654ad1b628 100644 --- a/share/man/man4/man4.i386/intro.4 +++ b/share/man/man4/man4.i386/intro.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: intro.4,v 1.2 1998/07/12 09:55:22 downsj Exp $ +.\" $OpenBSD: intro.4,v 1.3 1998/07/27 23:14:12 marc Exp $ .\" .\" Copyright (c) 1994 Christopher G. Demetriou .\" All rights reserved. @@ -104,54 +104,56 @@ Adaptec 154x ISA SCSI adapter boards. Adaptec 1742 EISA SCSI adapter boards. .It aic Adaptec AIC-6260, Adaptec AIC-6360, Adaptec 152x, and SoundBlaster SCSI boards. +.It apm +advanced power management device interface. .It ast multiplexing serial communications card first made by AST. .It bt Buslogic BT-445, BT-74x, and BT-9xx SCSI boards. .It com NS8250-, NS16450-, and NS16550-based asynchronous serial -communications device interface +communications device interface. .It cy Cyclades Cyclom-4Y, -8Y, and -16Y asynchronous serial communications -device interface +device interface. .It ed Western Digital/SMC 80x3 and Ultra, 3Com 3c503, and Novell NE1000 and 2000 -Ethernet interface +Ethernet interface. .It eg 3Com 3c505 Ethernet board. .It el 3Com 3c501 Ethernet board. .It ep -3Com Etherlink III (3c5x9) Ethernet interface +3Com Etherlink III (3c5x9) Ethernet interface. .It ie Ethernet driver for the AT&T StarLAN 10, EN100, StarLan Fiber, and 3Com 3c507. .It le Ethernet driver for BICC Isolan, Novell NE2100, and Digital DEPCA cards. .It lms -Logitech-style bus mouse device interface +Logitech-style bus mouse device interface. .It lpt -Parallel port device interface +Parallel port device interface. .It mcd Mitsumi CD-ROM drives. .It mem -Main memory interface +Main memory interface. .It mms -Microsoft-style bus mouse device interface +Microsoft-style bus mouse device interface. .It ncr NCR PCI SCSI adapter boards. .It npx -Numeric Processing Extension coprocessor and emulator +Numeric Processing Extension coprocessor and emulator. .It pms -PS/2 auxiliary port mouse device interface +PS/2 auxiliary port mouse device interface. .It rtfps -another multiplexing serial communications card +another multiplexing serial communications card. .It sb Sound Blaster card. .It sea Seagate/Future Domain SCSI cards. ST01/02, Future Domain TMC-885, and Future Domain TMC-950. .It speaker -console speaker device interface +console speaker device interface. .It uha Ultrastor ISA and EISA SCSI adapter cards. Ultrastore 14f, Ultrastore 34f, and Ultrastore 24f. |