xref: /dragonfly/share/man/man4/aps.4 (revision 0db87cb7)
1.\"	$OpenBSD: aps.4,v 1.8 2007/12/23 22:09:19 jmc Exp $
2.\"
3.\" Copyright (c) 2005 Jonathan Gray <jsg@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd March 18, 2010
18.Dt APS 4
19.Os
20.Sh NAME
21.Nm aps
22.Nd ThinkPad Active Protection System accelerometer
23.Sh SYNOPSIS
24To compile this driver into the kernel,
25place the following lines in your
26kernel configuration file:
27.Bd -ragged -offset indent
28.Cd "device isa"
29.Cd "device aps0 at isa? port 0x1600"
30.Ed
31.Pp
32Alternatively, to load the driver as a
33module at boot time, place the following line in
34.Xr loader.conf 5 :
35.Bd -literal -offset indent
36aps_load="YES"
37.Ed
38.Sh DESCRIPTION
39The
40.Nm
41driver provides support for several sensors found in some
42.Tn ThinkPad
43laptops.
44.Pp
45The sensors currently supported are:
46.Bl -column "Sensor         " "Units  " "Typical" -offset indent
47.It Sy "Sensor" Ta Sy "Units" Ta Sy "Typical Use"
48.It Li "X_ACCEL" Ta "Unknown" Ta "X Acceleration"
49.It Li "Y_ACCEL" Ta "Unknown" Ta "Y Acceleration"
50.It Li "X_VAR" Ta "Unknown" Ta "Weighted X Acceleration?"
51.It Li "Y_VAR" Ta "Unknown" Ta "Weighted Y Acceleration?"
52.It Li "Temp1" Ta "uK" Ta "Unknown"
53.It Li "Temp2" Ta "uK" Ta "Unknown"
54.It Li "Keyboard Active" Ta "boolean" Ta "Keyboard activity"
55.It Li "Mouse Active" Ta "boolean" Ta "Mouse activity"
56.It Li "Lid Open" Ta "boolean" Ta "Lid state"
57.El
58.Pp
59Sensor values are made available through the
60.Dv HW_SENSORS
61.Xr sysctl 3
62interface,
63and can be monitored with the
64.Xr systat 1
65.Ar sensors
66display,
67.Xr sensorsd 8
68and
69.Xr sysctl 8
70.Ar hw.sensors .
71For example, on a ThinkPad R51:
72.Bd -literal -offset indent
73%sysctl hw.sensors.aps0
74hw.sensors.aps0.raw0: 488 (X_ACCEL)
75hw.sensors.aps0.raw1: 481 (Y_ACCEL)
76hw.sensors.aps0.raw2: 488 (X_VAR)
77hw.sensors.aps0.raw3: 481 (Y_VAR)
78hw.sensors.aps0.temp0: 52.00 degC
79hw.sensors.aps0.temp1: 52.00 degC
80hw.sensors.aps0.indicator0: Off (Keyboard Active)
81hw.sensors.aps0.indicator1: Off (Mouse Active)
82hw.sensors.aps0.indicator2: On (Lid Open)
83.Ed
84.Sh SEE ALSO
85.Xr systat 1 ,
86.Xr sysctl 3 ,
87.Xr intro 4 ,
88.Xr isa 4 ,
89.Xr sensorsd 8 ,
90.Xr sysctl 8
91.Sh HISTORY
92The
93.Nm
94driver first appeared in
95.Ox 3.8 .
96.Dx
97support was added in
98.Dx 2.5 .
99.Sh AUTHORS
100.An -nosplit
101The
102.Nm
103driver was written by
104.An Jonathan Gray Aq Mt jsg@openbsd.org .
105It was adapted to
106.Dx
107by
108.An Constantine A. Murenin ,
109University of Waterloo.
110.Sh CAVEATS
111The
112.Nm
113driver does not yet maintain state and subsequently does not take
114evasive action when it thinks the hard drive is in danger.
115.Pp
116The Y axis on X40 and possibly other models seems to be inverted.
117It is unknown how to distinguish between different versions of the
118accelerometer to compensate for this in the driver at this time.
119.Pp
120As IBM provides no documentation, it is not known what all the available
121sensors are used for.
122