Date: Tue, 15 Apr 2008 23:01:14 +0900 From: Akira Funahashi <funa@funa.org> To: rpaulo@FreeBSD.org Cc: acpi@freebsd.org, marcin.nowak@simplusnet.pl Subject: Re: Unsupported Asus laptop: A6F Message-ID: <qrrlk3fnro5.wl%funa@funa.org> In-Reply-To: <e1309ba60804150617m59daf877k4756ff24b480ba27@mail.gmail.com> References: <200804142221.02809.marcin.nowak@simplusnet.pl> <e1309ba60804150617m59daf877k4756ff24b480ba27@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Hi, I've created a patch for 7.0-RELEASE which will support A3E, A3F and A6F. This patch also includes some fix to A3N, which seems to be not working for hw.acpi.asus.lcd_brightness. This patch also includes EeePC support. At Tue, 15 Apr 2008 14:17:58 +0100, "Rui Paulo" <rpaulo@FreeBSD.org> wrote: > Could you please try to fetch the latest acpi4asus tarball from > http://acpi4asus.sourceforge.net/ and, if you can, produce a patch > against FreeBSD's acpi_asus(4) driver? Well, this is exactly what I have done for this patch. I don't have ASUS machine except EeePC, but if someone can try, I am pleased to write a patch for other ASUS products. Thanks, -- Akira Funahashi/[funa@funa.org] [-- Attachment #2 --] --- 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; [-- Attachment #3 --]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?qrrlk3fnro5.wl%funa>
