aac6db0df7c3f9a079d9a29d61dc2a383b16b983
[dragonfly.git] / share / man / man4 / acpi_panasonic.4
1 .\"
2 .\" Copyright (c) 2004 OGAWA Takaya <t-ogawa@triaez.kaisei.org>
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD: src/share/man/man4/acpi_panasonic.4,v 1.2 2009/09/17 13:12:24 brueffer Exp $
27 .\"
28 .Dd November 11, 2009
29 .Dt ACPI_PANASONIC 4
30 .Os
31 .Sh NAME
32 .Nm acpi_panasonic
33 .Nd "ACPI hotkey driver for Panasonic laptops"
34 .Sh SYNOPSIS
35 To compile this driver into the kernel,
36 place the following line in your
37 kernel configuration file:
38 .Bd -ragged -offset indent
39 .Cd "device acpi_panasonic"
40 .Ed
41 .Pp
42 Alternatively, to load the driver as a
43 module at boot time, place the following line in
44 .Xr loader.conf 5 :
45 .Bd -literal -offset indent
46 acpi_panasonic_load="YES"
47 .Ed
48 .Sh DESCRIPTION
49 The
50 .Nm
51 driver enables such hotkey facilities of various Panasonic laptops as
52 changing LCD brightness, controlling mixer volumes, entering sleep or
53 suspended state and so on.
54 On the following models it is reported to work: Let's note (or
55 Toughbook, outside Japan) CF-R1N, CF-R2A and CF-R3.
56 It may also work on other models as well.
57 .Pp
58 The driver consists of three functionalities.
59 The first is to detect hotkey events and take corresponding actions,
60 which include changing LCD luminance and speaker mute state.
61 The second role is to notify occurrences of the event by way of
62 .Xr devctl 4
63 and eventually to
64 .Xr devd 8 .
65 The third and last is to provide a way to adjust LCD brightness and
66 sound mute state via
67 .Xr sysctl 8 .
68 .Ss Hotkeys
69 There are 9 hotkeys available on the supported hardwares:
70 .Pp
71 .Bl -tag -compact -offset indent
72 .It Sy Fn+F1
73 Make LCD backlight darker.
74 .It Sy Fn+F2
75 Make LCD backlight brighter.
76 .It Sy Fn+F3
77 Switch video output between LCD and CRT.
78 Not supported by the
79 .Nm
80 driver.
81 .It Sy Fn+F4
82 Toggle muting the speaker.
83 .It Sy Fn+F5
84 Turn the mixer volume down.
85 .It Sy Fn+F6
86 Turn the mixer volume up.
87 .It Sy Fn+F7
88 Enter suspend-to-RAM state.
89 .It Sy Fn+F9
90 Show battery status.
91 .It Sy Fn+F10
92 Enter suspend-to-disk state.
93 .El
94 .Pp
95 Actions are automatically taken within the driver for
96 .Sy Fn+F1 , Fn+F2
97 and
98 .Sy Fn+F4 .
99 For the other events such as
100 mixer control and showing battery status,
101 .Xr devd 8
102 should take the role as described below.
103 .Ss Xr devd 8 Ss Events
104 When notified to
105 .Xr devd 8 ,
106 the hotkey event provides the following information:
107 .Pp
108 .Bl -tag -compact -offset indent
109 .It system
110 .Qq Li ACPI
111 .It subsystem
112 .Qq Li Panasonic
113 .It type
114 The source of the event in ACPI namespace.
115 The value depends on the model but typically
116 .Qq Li \e_SB_.HKEY .
117 .It notify
118 Event code (see below).
119 .El
120 .Pp
121 Event codes to be generated are assigned as follows:
122 .Bl -tag -offset indent
123 .It 0x81-0x86, 0x89
124 .Sy Fn+F<n>
125 pressed.
126 0x81 corresponds to
127 .Sy Fn+F1 ,
128 0x82 corresponds to
129 .Sy Fn+F2 ,
130 and so on.
131 .It 0x01-0x07, 0x09, 0x1a
132 .Sy Fn+F<n>
133 released.
134 0x01 corresponds to
135 .Sy Fn+F1 ,
136 0x02 corresponds to
137 .Sy Fn+F2 ,
138 and so on.
139 .El
140 .Sh SYSCTL VARIABLES
141 The following MIBs are available:
142 .Bl -tag -width indent
143 .It Va hw.acpi.panasonic.lcd_brightness_max
144 The maximum level of brightness.
145 The value is read only and
146 automatically set according to hardware model.
147 .It Va hw.acpi.panasonic.lcd_brightness_min
148 The minimum level of brightness.
149 The value is read only and
150 automatically set according to hardware model.
151 .It Va hw.acpi.panasonic.lcd_brightness
152 Current brightness level of the LCD (read-write).
153 The value ranges from
154 .Va hw.acpi.panasonic.lcd_brightness_min
155 to
156 .Va hw.acpi.panasonic.lcd_brightness_max .
157 .It Va hw.acpi.panasonic.sound_mute
158 A read-write boolean flag to control whether to mute the speaker.
159 The value 1 means to mute and 0 not.
160 .El
161 .Sh SEE ALSO
162 .Xr acpi 4 ,
163 .Xr devd.conf 5 ,
164 .Xr devd 8 ,
165 .Xr sysctl 8
166 .Sh HISTORY
167 The
168 .Nm
169 driver first appeared in
170 .Fx 5.3 .
171 It was then ported to
172 .Dx 2.5 .
173 .Sh AUTHORS
174 .An -nosplit
175 The
176 .Nm
177 driver and this manual page were written by
178 .An OGAWA Takaya Aq t\-ogawa@triaez.kaisei.org
179 and
180 .An TAKAHASHI Yoshihiro Aq nyan@FreeBSD.org .