Subject: Re: Panasonic ACPI support for special keys
To: Bruno D'Arcangeli <bruno.darcangeli@armonix.org>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 04/10/2005 23:34:22
--FCF9ydJxlAJsfRTu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Apr 10, 2005 at 10:13:37PM +0200, Bruno D'Arcangeli wrote:
> Hello,
>=20
> Can someone port the FreeBSD panasonic hotkey suppport to NetBSD ?
> The file is in src/sys/dev/acpi_support/acpi_panasonic.c
> I've made the asl and dsdt acpidump http://www.armonix.org/NetBSD/
> I'm ready to donate some money for this.
> I've already tried to do that but it's away from my knowledge.

It's rather straightforward stuff, however I'm wondering a few things
about the interface.

I've done more or less the same thing for my ASUS laptop on Saturday,
but with a different interface.  For the hot keys themselves, actually
those that generate only one kind of Notify, I attached a wskbd(4)
device so it gets muxed with any other keyboard, and then you get the
result as a "normal" keys (the hard part was figuring out what raw
scancode I should give to X--I'm still rather unsure about that part).

As for the brightness control, I have no idea what kind of user
interface we should use.  Linux and FreeBSD both have that rather
annoying habit of creating new sysctl nodes (or /proc/sys entries) for
everything and its mother, resulting in a very inconsistent interface
for usually very similar things.

FreeBSD and Linux uses a kernel notification interface to fire events
to userland when "hot keys" are pressed.  I think it is debatable, as
a wskbd device can be used to get the notification, provided you detach
it from the mux it shares with the main keyboard and get a daemon to
read on it.  After all, they are keys so making them appear as a
keyboard makes sense.

On to the LCD brightness control, well, this ought to be unified in
some way...  FreeBSD makes it appear as sysctl nodes in a
"acpi.panasonic" sub-tree.  I don't think it is acceptable.  But then,
it's so easy to add sysctl nodes...

So I'm asking the good tech-kern folks.  How do you think this should
work?

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

--FCF9ydJxlAJsfRTu
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBQlmb3tgoQloHrPnoAQKV/QgAl4DzvsDd6ifgPCaJkSmb6gnkVJbJT7rY
ebWlF+cqbPRYOmhv6jXjM6yqID9B7fN1nfSLPQdpbpyDmeAFW9ZB7ASv7SlJ+QO8
Ag/oQ0HdJyn5o36mt6EloGG30wXXEyswN3K7Jl7iLAxxczXKNRnnHngO2hl5nh0r
aRyQViTrxUj7ahqIyLVFvMIpg0UrRtMsUOSG7w9VXWEQh5WGowsf4TlD6RenF7VV
Bmufsb6HPZZEcfVZJa38WPyzwGxM52OylPWtft7viB8l2NtWTIHSy3SqlufMeq/V
S8ZwXtj95Pf1qcS2vij/m+xEITU7pSbyvZAsYO249k5jBW68HgSxfA==
=ULhI
-----END PGP SIGNATURE-----

--FCF9ydJxlAJsfRTu--