From nobody@FreeBSD.org  Thu Nov  6 08:22:03 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E4097106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  6 Nov 2008 08:22:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id C81C48FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  6 Nov 2008 08:22:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mA68M3ds051326
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 6 Nov 2008 08:22:03 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id mA68M2I2051325;
	Thu, 6 Nov 2008 08:22:02 GMT
	(envelope-from nobody)
Message-Id: <200811060822.mA68M2I2051325@www.freebsd.org>
Date: Thu, 6 Nov 2008 08:22:02 GMT
From: Marcin Nowak <marcin.nowak@simplusnet.pl>
To: freebsd-gnats-submit@FreeBSD.org
Subject: patch for acpi asus a6f laptop isn't in official repo
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         128634
>Category:       kern
>Synopsis:       [patch] fix acpi_asus(4) in asus a6f laptop
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-acpi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 06 08:30:05 UTC 2008
>Closed-Date:    Wed Apr 03 15:24:27 UTC 2013
>Last-Modified:  Wed Apr 03 15:24:27 UTC 2013
>Originator:     Marcin Nowak
>Release:        FreeBSD-CURRENT
>Organization:
n/a
>Environment:
>Description:
Hi

Some time ago I have reported request for acpi support my asus a6f
laptop, and I got the patch from someone on this mailing-list. Patch
(*.diff file) works fine so, why isn't in official cvs repo yet? :)

Patch in attachment
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- acpi_asus.c.dist	2007-06-03 06:10:00.000000000 +0900
+++ acpi_asus.c	2008-04-15 22:47:29.000000000 +0900
@@ -146,16 +146,39 @@
 		.disp_set	= "SDSP"
 	},
 	{
+		.name           = "A3E",
+		.mled_set       = "MLED",
+		.wled_set       = "WLED",
+		.lcd_get        = "\\_SB.PCI0.SBRG.EC0.RPIN(0x67)",
+		.lcd_set        = "\\_SB.PCI0.SBRG.EC0._Q10",
+		.brn_get        = "GPLV",
+		.brn_set        = "SPLV",
+		.disp_get       = "\\_SB.PCI0.P0P2.VGA.GETD",
+		.disp_set       = "SDSP"
+	},
+	{
+		.name           = "A3F",
+		.mled_set       = "MLED",
+		.wled_set       = "WLED",
+		.bled_set       = "BLED",
+		.lcd_get        = "\\_SB.PCI0.SBRG.EC0.RPIN(0x11)",
+		.lcd_set        = "\\_SB.PCI0.SBRG.EC0._Q10",
+		.brn_get        = "GPLV",
+		.brn_set        = "SPLV",
+		.disp_get       = "\\SSTE",
+		.disp_set       = "SDSP"
+	},
+	{
 		.name           = "A3N",
 		.mled_set       = "MLED",
 		.bled_set       = "BLED",
 		.wled_set       = "WLED",
-		.lcd_get        = NULL,
+		.lcd_get        = "\\BKLT",
 		.lcd_set        = "\\_SB.PCI0.SBRG.EC0._Q10",
+		.brn_get        = "GPLV",
 		.brn_set        = "SPLV",
-		.brn_get        = "SDSP",
-		.disp_set       = "SDSP",
-		.disp_get       = "\\_SB.PCI0.P0P3.VGA.GETD"
+		.disp_get       = "\\_SB.PCI0.P0P3.VGA.GETD",
+		.disp_set       = "SDSP"
 	},
 	{
 		.name		= "A4D",
@@ -354,6 +377,20 @@
 	{ .name = NULL }
 };
 
+/*
+ * EeePC have an Asus ASUS010 gadget interface,
+ * but they can't be probed quite the same way as Asus laptops.
+ */
+static struct acpi_asus_model acpi_eeepc_models[] = {
+	{
+		.name		= "EEE",
+		.brn_get	= "\\_SB.ATKD.PBLG",
+		.brn_set	= "\\_SB.ATKD.PBLS"
+	},
+
+	{ .name = NULL }
+};
+
 static struct {
 	char	*name;
 	char	*description;
@@ -423,13 +460,17 @@
 	ACPI_BUFFER		Buf;
 	ACPI_OBJECT		Arg, *Obj;
 	ACPI_OBJECT_LIST	Args;
-	static char		*asus_ids[] = { "ATK0100", NULL };
+	static char		*asus_ids[] = { "ATK0100", "ASUS010", NULL };
+	char *rstr;
 
 	ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
 
-	if (acpi_disabled("asus") ||
-	    ACPI_ID_PROBE(device_get_parent(dev), dev, asus_ids) == NULL)
+	if (acpi_disabled("asus"))
 		return (ENXIO);
+	rstr = ACPI_ID_PROBE(device_get_parent(dev), dev, asus_ids);
+	if (rstr == NULL) {
+		return (ENXIO);
+	}
 
 	sc = device_get_softc(dev);
 	sc->dev = dev;
@@ -468,6 +509,14 @@
 			AcpiOsFree(Buf.Pointer);
 			return (0);
 		}
+
+		/* if EeePC */
+		if(strncmp("ASUS010", rstr, 7) == 0) {
+			sc->model = &acpi_eeepc_models[0];
+			device_set_desc(dev, "ASUS EeePC");
+			AcpiOsFree(Buf.Pointer);
+			return (0);
+		}
 	}
 
 	sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND);
@@ -511,6 +560,9 @@
 		else if (strncmp(model->name, "A2x", 3) == 0 &&
 		    strncmp(Obj->String.Pointer, "A2", 2) == 0)
 			goto good;
+		else if (strncmp(model->name, "A3F", 3) == 0 &&
+		    strncmp(Obj->String.Pointer, "A6F", 3) == 0)
+			goto good;
 		else if (strncmp(model->name, "D1x", 3) == 0 &&
 		    strncmp(Obj->String.Pointer, "D1", 2) == 0)
 			goto good;


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-acpi 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Nov 6 11:25:29 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128634 
State-Changed-From-To: open->feedback 
State-Changed-By: rpaulo 
State-Changed-When: Fri Nov 7 13:53:14 UTC 2008 
State-Changed-Why:  
This patch includes Eee PC support, which has been committed already. 
Can you send a patch that applies cleanly to HEAD? 

Thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128634 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/128634: commit references a PR
Date: Sat,  4 Apr 2009 17:01:42 +0000 (UTC)

 Author: attilio
 Date: Sat Apr  4 17:01:32 2009
 New Revision: 190695
 URL: http://svn.freebsd.org/changeset/base/190695
 
 Log:
   - Add the support for the Asus A3F and A3E device
   - Fix style for A3N and for a comment
   
   Submitted by:	Akira Funahashi <funa@funa.org>
   Tested by:	Marcin Nowak <marcin.nowak@simplusnet.pl>,
   		Diego Sardina <diego.sardina@gmx.com>
   PR:		kern/128634
 
 Modified:
   head/sys/dev/acpi_support/acpi_asus.c
 
 Modified: head/sys/dev/acpi_support/acpi_asus.c
 ==============================================================================
 --- head/sys/dev/acpi_support/acpi_asus.c	Sat Apr  4 16:03:28 2009	(r190694)
 +++ head/sys/dev/acpi_support/acpi_asus.c	Sat Apr  4 17:01:32 2009	(r190695)
 @@ -176,16 +176,39 @@ static struct acpi_asus_model acpi_asus_
  		.disp_set	= "SDSP"
  	},
  	{
 +		.name           = "A3E",
 +		.mled_set       = "MLED",
 +		.wled_set       = "WLED",
 +		.lcd_get        = "\\_SB.PCI0.SBRG.EC0.RPIN(0x67)",
 +		.lcd_set        = "\\_SB.PCI0.SBRG.EC0._Q10",
 +		.brn_get        = "GPLV",
 +		.brn_set        = "SPLV",
 +		.disp_get       = "\\_SB.PCI0.P0P2.VGA.GETD",
 +		.disp_set       = "SDSP"
 +	},
 +	{
 +		.name           = "A3F",
 +		.mled_set       = "MLED",
 +		.wled_set       = "WLED",
 +		.bled_set       = "BLED",
 +		.lcd_get        = "\\_SB.PCI0.SBRG.EC0.RPIN(0x11)",
 +		.lcd_set        = "\\_SB.PCI0.SBRG.EC0._Q10",
 +		.brn_get        = "GPLV",
 +		.brn_set        = "SPLV",
 +		.disp_get       = "\\SSTE",
 +		.disp_set       = "SDSP"
 +	},
 +	{
  		.name           = "A3N",
  		.mled_set       = "MLED",
  		.bled_set       = "BLED",
  		.wled_set       = "WLED",
 -		.lcd_get        = NULL,
 +		.lcd_get        = "\\BKLT",
  		.lcd_set        = "\\_SB.PCI0.SBRG.EC0._Q10",
 +		.brn_get        = "GPLV",
  		.brn_set        = "SPLV",
 -		.brn_get        = "SDSP",
 -		.disp_set       = "SDSP",
 -		.disp_get       = "\\_SB.PCI0.P0P3.VGA.GETD"
 +		.disp_get       = "\\_SB.PCI0.P0P3.VGA.GETD",
 +		.disp_set       = "SDSP"
  	},
  	{
  		.name		= "A4D",
 @@ -577,7 +600,7 @@ acpi_asus_probe(device_t dev)
  			return (0);
  		}
  
 -		/* if EeePC */
 +		/* EeePC */
  		if (strncmp("ASUS010", rstr, 7) == 0) {
  			sc->model = &acpi_eeepc_models[0];
  			device_set_desc(dev, "ASUS EeePC");
 @@ -627,6 +650,9 @@ good:
  		else if (strncmp(model->name, "A2x", 3) == 0 &&
  		    strncmp(Obj->String.Pointer, "A2", 2) == 0)
  			goto good;
 +		else if (strncmp(model->name, "A3F", 3) == 0 &&
 +		    strncmp(Obj->String.Pointer, "A6F", 3) == 0)
 +			goto good;
  		else if (strncmp(model->name, "D1x", 3) == 0 &&
  		    strncmp(Obj->String.Pointer, "D1", 2) == 0)
  			goto good;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->patched 
State-Changed-By: jh 
State-Changed-When: Sun Sep 19 08:50:25 UTC 2010 
State-Changed-Why:  
A patch has been committed in r190695. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128634 

From: Andriy Gapon <avg@freebsd.org>
To: bug-followup@freebsd.org, Attilio Rao <attilio@freebsd.org>
Cc:  
Subject: Re: kern/128634: [patch] fix acpi_asus(4) in asus a6f laptop
Date: Sun, 05 Dec 2010 17:22:38 +0200

 Has the fix been MFC-ed?  Can the PR be closed now?
 -- 
 Andriy Gapon

From: hiren panchasara <hiren.panchasara@gmail.com>
To: bug-followup@FreeBSD.org, marcin.nowak@simplusnet.pl, rpaulo@freebsd.org
Cc:  
Subject: Re: kern/128634: [patch] fix acpi_asus(4) in asus a6f laptop
Date: Tue, 2 Apr 2013 16:20:39 -0700

 --089e01681d165529f304d968fc65
 Content-Type: text/plain; charset=UTF-8
 
 This has been MFCed.
 
 Can we close this PR?
 
 Thanks,
 Hiren
 
 --089e01681d165529f304d968fc65
 Content-Type: text/html; charset=UTF-8
 
 <div dir="ltr">This has been MFCed. <br><br>Can we close this PR?<br><br>Thanks,<br>Hiren<br></div>
 
 --089e01681d165529f304d968fc65--
State-Changed-From-To: patched->closed 
State-Changed-By: rpaulo 
State-Changed-When: Wed Apr 3 15:23:34 UTC 2013 
State-Changed-Why:  
Fixed a long time ago. 

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