From dunstan@freebsd.czest.pl  Sun Dec 18 19:01:02 2005
Return-Path: <dunstan@freebsd.czest.pl>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id BA36216A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 18 Dec 2005 19:01:02 +0000 (GMT)
	(envelope-from dunstan@freebsd.czest.pl)
Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D503543D58
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 18 Dec 2005 19:00:58 +0000 (GMT)
	(envelope-from dunstan@freebsd.czest.pl)
Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4])
	by freebsd.czest.pl (8.12.10/8.12.9) with ESMTP id jBIJ3PPx081211
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 18 Dec 2005 19:03:25 GMT
	(envelope-from dunstan@freebsd.czest.pl)
Received: (from dunstan@localhost)
	by freebsd.czest.pl (8.13.4/8.12.9/Submit) id jBIJ3OSk081210;
	Sun, 18 Dec 2005 19:03:24 GMT
	(envelope-from dunstan)
Message-Id: <200512181903.jBIJ3OSk081210@freebsd.czest.pl>
Date: Sun, 18 Dec 2005 19:03:24 GMT
From: "Wojciech A. Koszek" <dunstan@freebsd.czest.pl>
Reply-To: "Wojciech A. Koszek" <dunstan@freebsd.czest.pl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Support for ASUS A4D laptop
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         90607
>Category:       kern
>Synopsis:       [acpi] [patch] Support for ASUS A4D laptop
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    philip
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 18 19:10:02 GMT 2005
>Closed-Date:    Mon Jan 30 00:02:13 GMT 2006
>Last-Modified:  Mon Jan 30 00:02:13 GMT 2006
>Originator:     Wojciech A. Koszek
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD laptop.freebsd.czest.pl 7.0-CURRENT FreeBSD 7.0-CURRENT #2: Sun Dec 18 01:31:49 CET 2005 dunstan@laptop.freebsd.czest.pl:/usr/obj/usr/src/sys/LAPTOP i386


>Description:

Support for my ASUS A4D. I couldn't find right parameters for video output.
Other come from debugged ACPI (with reporting turned on). At current stage,
I have no problems with either brightness increasing/descreasing, (using
Fn+(F5,F6) makes needed changes to hw.acpi.asus.lcd_brightness), or turning
message LED on/off.

After uncommenting these two, currently commented lines (values fetch from
output of ACPI debugging together with recognizing function of the key with
help of it's icon), I have expirienced following problems: loading kernel
module or traversing sysctl(9) tree disables LCD display, and turning its on
means hitting keys mentioned above several times. Also video_output just
after module loading seems a little bit odd:

root@laptop:(/usr/src/sys/modules/acpi/acpi_asus)# sysctl hw.acpi.asus
hw.acpi.asus.lcd_brightness: 15
hw.acpi.asus.video_output: 52

Switching from 0 to 7 give me nothing.

>How-To-Repeat:
>Fix:

My proposal is to leave these lines commented and wait for someone with
enough time to play with it. Unfortunately, I have to give my laptop back.
If I have some possibility, I'll try to make further investigation.

http://freebsd.czest.pl/dunstan/FreeBSD/asus_a4d.0.patch

--- asus_a4d.0.patch begins here ---
(c) 2005 <Wojciech A. Koszek dunstan^freebsd.czest.pl>

Patch against FreeBSD 7.0-CURRENT, kern.osreldate: 700008.

diff -upr /usr/src/sys/dev/acpi_support/acpi_asus.c src/sys/dev/acpi_support/acpi_asus.c
--- /usr/src/sys/dev/acpi_support/acpi_asus.c	Sun Sep 11 20:39:00 2005
+++ src/sys/dev/acpi_support/acpi_asus.c	Sun Dec 18 16:38:25 2005
@@ -287,7 +287,18 @@ static struct acpi_asus_model acpi_asus_
 		.disp_get	= "\\_SB.PCI0.P0P1.VGA.GETD",
 		.disp_set	= "SDSP"
 	},
-
+	{
+		.name		= "A4D",
+		.mled_set	= "MLED",
+		.brn_up		= "\\_SB_.PCI0.SBRG.EC0._Q0E",
+		.brn_dn		= "\\_SB_.PCI0.SBRG.EC0._Q0F",
+		.brn_get	= "GPLV",
+		.brn_set	= "SPLV",
+#if 0
+		.disp_get	= "\\_SB_.PCI0.SBRG.EC0._Q10",
+		.disp_set	= "\\_SB_.PCI0.SBRG.EC0._Q11"
+#endif
+	},
 	{ .name = NULL }
 };
 
--- asus_a4d.0.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-acpi 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Dec 18 20:03:10 UTC 2005 
Responsible-Changed-Why:  
Let's see if this will get some attention on the mailing list. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90607 
Responsible-Changed-From-To: freebsd-acpi->philip 
Responsible-Changed-By: philip 
Responsible-Changed-When: Tue Dec 27 23:29:46 UTC 2005 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90607 
State-Changed-From-To: open->closed 
State-Changed-By: philip 
State-Changed-When: Mon Jan 30 00:00:17 UTC 2006 
State-Changed-Why:  
Committed.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90607 
>Unformatted:
