From owner-freebsd-acpi@FreeBSD.ORG Tue Jul 27 17:04:38 2004 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC67616A4CE for ; Tue, 27 Jul 2004 17:04:38 +0000 (GMT) Received: from crumpet.united-ware.com (ddsl-66-42-172-210.fuse.net [66.42.172.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12FA443D49 for ; Tue, 27 Jul 2004 17:04:38 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from [192.168.1.102] (ddsl-66-42-172-210.fuse.net [66.42.172.210]) (authenticated bits=0)i6RGrojr004155 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 27 Jul 2004 12:53:50 -0400 (EDT) (envelope-from mistry.7@osu.edu) From: Anish Mistry To: acpi@FreeBSD.org Date: Tue, 27 Jul 2004 12:59:15 -0400 User-Agent: KMail/1.6.2 References: <20040712.200815.74734634.nyan@jp.FreeBSD.org> <40FE9BEA.7060802@root.org> <20040724221344.GE85709@fasolt.home.paeps.cx> In-Reply-To: <20040724221344.GE85709@fasolt.home.paeps.cx> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200407271259.24724.mistry.7@osu.edu> X-Spam-Status: No, hits=-4.9 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE, QUOTED_EMAIL_TEXT,RCVD_IN_ORBS,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_KMAIL version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Subject: Re: Generic hotkey script (was: Re: Panasonic acpi driver) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 17:04:38 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 24 July 2004 06:13 pm, Philip Paeps wrote: > On 2004-07-21 09:38:02 (-0700), Nate Lawson wrote: > > I don't want us to import any device-specific hotkey scripts (i.e., asu= s, > > panasonic, toshiba, etc.) but instead have a single general-purpose > > script and have the kernel translate device-specific tables of hotkey > > values to generic ones. That way a single script can look for the > > generic "volume up/down" buttons and act accordingly. > > > > Please email me if you're interested in working on that. > > I've been thinking about this a while ago, but it somehow got itself stuck > on my 'maybe later' stack. My idea was to have devd do the magic here.=20 > Agree on some constants (ACPI_VOLUME_UP, ACPI_VOLUME_MUTE, > ACPI_HOTKEY_1,...) that the specific drivers could send to devd using > acpi_UserNotify(). > > We could then have a devd script (much like we also have power_profile, or > we could rename that to 'acpi_event' or something similar) to catch these > events. > > notify 10 { > match "system" "ACPI"; > match "subsystem" "HOTKEY"; > action "/etc/rc.d/acpi_event $notify"; > }; > > To avoid having a notify section for every different device specific acpi > driver, we could either have them all be ACPI_MODULE_NAME("HOTKEY"), or we > could register them under an umbrella hotkey driver. The latter approach > might be nicer. Then we could also add other non-acpi hotkey gadgets (ir > remote controls maybe? :-)) under it? > > I'd be interested in hacking at this. > > - Philip This would be nice. I'd be able to put some time into this since it would = be=20 good to get it committed before the freeze. I think the=20 ACPI_MODULE_NAME("HOTKEY") way would be best for now since you could always= =20 just have other non-acpi devices use another devd entry that would just cal= l=20 the acpi_hotkey script action. I'll try on modifying my script for the=20 acpi_fuji driver to be generic. =2D --=20 Anish Mistry =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBBonrxqA5ziudZT0RAqSVAJ9nyHHgDMWuGjIn4zIBYVsvq1pH9wCgqtRi EwA61QFdGmY+dpVKhleZ6Dc=3D =3Dz16N =2D----END PGP SIGNATURE-----