From owner-acpi-jp@jp.FreeBSD.org Sat Apr  3 23:52:49 2004
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id i33EqnP84513;
	Sat, 3 Apr 2004 23:52:49 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from aragorn.middle.earth ([2002:dba4:1d1d:b001:202:2dff:fe3e:4ee5])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet6 id i33Eqmd84508
	for <acpi-jp@jp.FreeBSD.org>; Sat, 3 Apr 2004 23:52:49 +0900 (JST)
	(envelope-from t-ogawa@triaez.kaisei.org)
Received: from aragorn.middle.earth (localhost [127.0.0.1])
	by aragorn.middle.earth (8.12.11/8.12.11) with ESMTP id i33EqJ5H002129;
	Sat, 3 Apr 2004 23:52:19 +0900 (JST)
	(envelope-from t-ogawa@triaez.kaisei.org)
Message-ID: <86k70x9krg.wl.t-ogawa@triaez.kaisei.org>
From: OGAWA Takaya <t-ogawa@triaez.kaisei.org>
To: Nate Lawson <nate@root.org>
Cc: acpi-jp@jp.FreeBSD.org
In-Reply-To: <864qs5qagd.wl.t-ogawa@triaez.kaisei.org>
References: <20040330125842.U82732@root.org>
	<86oeqixi4y.wl.t-ogawa@triaez.kaisei.org>
	<864qs5qagd.wl.t-ogawa@triaez.kaisei.org>
User-Agent: Wanderlust/2.10.1 (Watching The Wheels) Emacs/21.3 Mule/5.0 (SAKAKI)
MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen")
Content-Type: multipart/mixed;
 boundary="Multipart_Sat_Apr__3_23:52:19_2004-1"
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Sat, 03 Apr 2004 23:52:19 +0900
X-Sequence: acpi-jp 3185
Subject: [acpi-jp 3185] Re: acpi_panasonic: ACPI hotkey driver for Panasonic laptops
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: t-ogawa@triaez.kaisei.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+040307

--Multipart_Sat_Apr__3_23:52:19_2004-1
Content-Type: text/plain; charset=ISO-2022-JP

At Thu, 01 Apr 2004 00:53:54 +0900,
OGAWA Takaya wrote:
> > I took a quick glance at the code and it looks good.  Care to submit a man
> > page also?
> 
> I'll try this weekend.

I've written up a man page, updated acpi_panasonic script to place
it under /etc/rc.d and updated the archive.  No change to the driver
code itself.
<http://triaez.kaisei.org/~t-ogawa/misc/acpi_panasonic-20040403.tar.gz>

The man page also attached to this mail for convenience.

----------
$B$*$,$o(B $B$?$+$d(B
t-ogawa@triaez.kaisei.org

--Multipart_Sat_Apr__3_23:52:19_2004-1
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: attachment; filename="acpi_panasonic.4"
Content-Transfer-Encoding: 7bit

.\"
.\" Copyright (c) 2004 OGAWA Takaya <t-ogawa@triaez.kaisei.org>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd April 3, 2004
.Dt ACPI_PANASONIC 4 i386
.Os
.Sh NAME
.Nm acpi_panasonic
.Nd "ACPI hotkey driver for Panasonic laptops"
.Sh SYNOPSIS
.Cd "device acpi_panasonic"
.Sh DESCRIPTION
The
.Nm
driver enables such hotkey facilities of various Panasonic laptops as
changing LCD brightness, controlling mixer volumes, entering sleep or
suspended state and so on.
On the following models it is reported to work: Let's note (or
Toughbook, outside Japan) CF-R1N, CF-R2A.
It may also work on other models as well.
.Pp
On these models there are 9 hotkeys available:
.Pp
.Bl -tag -compact -offset indent
.It Sy \&Fn+F1
Make LCD backlight darker.
.It Sy \&Fn+F2
Make LCD backlight brighter.
.It Sy \&Fn+F3
Switch video output between LCD and CRT.
Not supported within the
.Nm
driver.
.It Sy \&Fn+F4
Toggle muting a speaker.
.It Sy \&Fn+F5
Turn the mixer volume down.
.It Sy \&Fn+F6
Turn the mixer volume up.
.It Sy \&Fn+F7
Enter suspend-to-RAM state.
.It Sy \&Fn+F9
Show battery status.
.It Sy \&Fn+F10
Enter suspend-to-disk state.
.El
.Pp
The driver consists of two functionality.
The first is to notify the occurence of the hotkey event by way of
.Xr devctl 4
and eventually to
.Xr devd 8 .
The second role is to provide the way to adjust LCD brightness and
sound mute state via sysctl.  
.Sh DEVD EVENTS
When notified to
.Xr devd 8 ,
the hotkey event provides the following information:
.Pp
.Bl -tag -compact -offset indent
.It system
.Qq ACPI
.It subsystem
.Qq Panasonic
.It type
The source of the event in ACPI namespace.
The value depends on the model but typically
.Qq \e_SB_.HKEY .
.It notify
Event code (see below).
.El
.Pp
Event codes to be generated are assigned as follows:
.Bl -tag -offset indent
.It 0x81-0x86, 0x89
.Sy \&Fn+F<n>
pressed. 0x81 corresponds to
.Sy \&Fn+F1 ,
0x82 corresponds to
.Sy \&Fn+F2 ,
and so on.
.It 0x81-0x87, 0x89, 0x8a
.Sy \&Fn+F<n>
released. 0x81 corresponds to
.Sy \&Fn+F1 ,
0x82 corresponds to
.Sy \&Fn+F2 ,
and so on.
.El
.Sh SYSCTLS
The following MIBs are available:
.Bl -tag -offset indent
.It Sy hw.acpi.panasonic0.lcd_brightness
Current brightness level of the LCD.
The value ranges from 0 to 255.
.It Sy hw.acpi.panasonic0.sound_mute
Boolean flag to control whether to mute the speaker.
The value 1 means to mute and 0 not.
.El
.Sh SEE ALSO
.Xr acpi 4 ,
.Xr sysctl 8 ,
.Xr devd 8 ,
.Xr devd.conf 5
.\" .Sh HISTORY
.\" The
.\" .Nm
.\" driver first appeared in
.\" .Fx 5.3 .
.Sh AUTHORS
The
.Nm
driver and this manual page was written by
.An OGAWA Takaya Aq t\-ogawa@triaez.kaisei.org
.Sh BUGS
The code is written in trial-and-error manner.
There is no way to confirm the correctness except by
.Dq it just works here .

--Multipart_Sat_Apr__3_23:52:19_2004-1--
