From owner-freebsd-mobile@FreeBSD.ORG Sun Mar 18 18:59:12 2007 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6602716A400 for ; Sun, 18 Mar 2007 18:59:12 +0000 (UTC) (envelope-from grafan@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.230]) by mx1.freebsd.org (Postfix) with ESMTP id 20B5C13C44C for ; Sun, 18 Mar 2007 18:59:11 +0000 (UTC) (envelope-from grafan@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so1007927wxc for ; Sun, 18 Mar 2007 11:59:11 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RU0q3/cghP/LdKdXNERtVEpTeNf+ngGecd7f5txGhYEoNBvJU9XfmhhU9aKCNa4cJV4wQ0WCRgqNqxpAvbvK2c7hCFK0FgkZ0q2zby1+cseoj6f30ICGULSsQeLiNfjFg0BlyOSwD2W+PjRKCIVZK16Z+U1j4DKwglvhvsFG0Qo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fU4GTW/fwykGSdn6+obuD2s+ba0ue9VIgaWyVVIBHhl5tsP3QCUCkHhxHAuvh0cIeR9sa5kigPBgjMBJsboY10SgB/cN44x5TZdqWFzXa/n2jbcMAlEHSzcnObSM39BcAQ7hxfe6E1TskpLH9iLmk5Vt4cyqOecaPh15UB2igy0= Received: by 10.90.84.17 with SMTP id h17mr3353121agb.1174244351388; Sun, 18 Mar 2007 11:59:11 -0700 (PDT) Received: by 10.140.23.10 with HTTP; Sun, 18 Mar 2007 11:59:11 -0700 (PDT) Message-ID: <6eb82e0703181159vcd095f9k4d65a8b3231c1bf@mail.gmail.com> Date: Mon, 19 Mar 2007 02:59:11 +0800 From: "Rong-en Fan" To: "Taku YAMAMOTO" In-Reply-To: <20070319025520.69486e29.taku@tackymt.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6eb82e0703161009w15787d99p51510299fa0e1e45@mail.gmail.com> <1174078831.829.11.camel@RabbitsDen> <6eb82e0703170100v572a0794q334dc34bec992685@mail.gmail.com> <20070317170959.f48f5bf6.taku@tackymt.homeip.net> <6eb82e0703170210t3d4be248w64b7cf9981880bbe@mail.gmail.com> <20070319025520.69486e29.taku@tackymt.homeip.net> Cc: njl@freebsd.org, Alexandre Sunny Kovalenko , freebsd-mobile@freebsd.org Subject: Re: ThinkPad x60 and FN keys X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2007 18:59:12 -0000 On 3/19/07, Taku YAMAMOTO wrote: > On Sat, 17 Mar 2007 17:10:38 +0800 > "Rong-en Fan" wrote: > > > Tested with newer acpica (available on acpi@). Without acpi_video, > > brightness control (FN+Home, End) works. Bluetooth control > > (fn+f5) works and the dev.acpi_ibm.0.bluetooth seems not flip flop. > > FN+F7 still not work. > > > > With acpi_video, brightness control does not work. > > > > Thank you. > > > > Regards, > > Rong-En Fan > > Fine. > It's expected that brightness hotkeys aren't functional with acpi_video on > recent ThinkPads because their BIOS stop handling of the brightness and > rely on OS once acpi_video gets involved. > > The acpi_video module should of cource be enhanced to handle these > brightness events defined in ACPI 3.0 spec. If I would have some spare > time... Thank you. In the mean time, could we get the patch committed? (I'm CC'ing Nate Lawson) BTW, if I understand you correctly, when acpi_video is loaded, fn+home/end will generate some events to acpi_video, but our acpi_video does not handle these events so the brightness are not adjusted? Is that right? Regards, Rong-En Fan == --- acpi_ec.c-1.69 Tue Feb 27 09:14:20 2007 +++ sys/dev/acpica/acpi_ec.c Tue Feb 27 14:39:52 2007 @@ -825,6 +825,11 @@ EcGpeHandler(void *Context) CTR1(KTR_ACPI, "ec event was IBE/OBF, status %#x", EcStatus); sc->ec_csrvalue = EcStatus; wakeup(&sc->ec_csrvalue); + if (!sc->ec_sci_pend) { + Status = AcpiEnableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_ISR); + if (ACPI_FAILURE(Status)) + printf("EcGpeHandler: AcpiEnableEvent failed\n"); + } } else if (!sc->ec_sci_pend) { /* SCI bit set and no pending query handler, so schedule one. */ CTR0(KTR_ACPI, "ec queueing gpe handler");