From owner-freebsd-acpi@FreeBSD.ORG Wed Feb 22 19:27:22 2012 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EFC11065670 for ; Wed, 22 Feb 2012 19:27:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 658E18FC12 for ; Wed, 22 Feb 2012 19:27:22 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id A9FC746B0A; Wed, 22 Feb 2012 14:27:21 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 14D6AB941; Wed, 22 Feb 2012 14:27:21 -0500 (EST) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Wed, 22 Feb 2012 08:30:32 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <1328719807459-5467015.post@n5.nabble.com> <201202211357.13783.jhb@freebsd.org> <1329871417389-5503811.post@n5.nabble.com> In-Reply-To: <1329871417389-5503811.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201202220830.32110.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 22 Feb 2012 14:27:21 -0500 (EST) Cc: simplicissimus Subject: Re: ACPI for Asus Notebook N50Vc X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 19:27:22 -0000 On Tuesday, February 21, 2012 7:43:37 pm simplicissimus wrote: > Thanks again for your time and the patch; unfortunately it gives me an error > message: > > http://paste.pocoo.org/show/554781/ > > This is my modified acpi_asus.c : > > http://paste.pocoo.org/show/554783/ > > I hope I got the changes to the file right. > > Regards > Simplicissimus Oops, try this: Index: acpi_asus.c =================================================================== --- acpi_asus.c (revision 231983) +++ acpi_asus.c (working copy) @@ -379,6 +379,18 @@ static struct acpi_asus_model acpi_asus_models[] = .disp_set = "SDSP" }, { + .name = "N50Vc", + .bled_set = "BLED", + .wled_set = "WLED", + .brn_get = "GPLV", + .brn_set = "SPLV", +#if 0 + .lcd_set = "\\_SB.PCI0.SBRG.EC0._Q10", +#endif + .disp_get = "\\_SB.PCI0.P0P1.VGA.GETD", + .disp_set = "SDSP" + }, + { .name = "S1x", .mled_set = "MLED", .wled_set = "WLED", @@ -509,6 +521,9 @@ static struct { ACPI_SERIAL_DECL(asus, "ACPI ASUS extras"); +static int acpi_asus_wapf = 1; +TUNABLE_INT("hw.acpi.asus.wapf", &acpi_asus_wapf); + /* Function prototypes */ static int acpi_asus_probe(device_t dev); static int acpi_asus_attach(device_t dev); @@ -735,6 +750,9 @@ acpi_asus_attach(device_t dev) sc->sysctl_tree = SYSCTL_ADD_NODE(&sc->sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "asus", CTLFLAG_RD, 0, ""); + SYSCTL_ADD_INT(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), + OID_AUTO, "wapf", CTLFLAG_RD, &acpi_asus_wapf, 0, + "Argument to pass WAPF method during initialization"); /* Hook up nodes */ for (int i = 0; acpi_asus_sysctls[i].name != NULL; i++) { @@ -804,6 +822,9 @@ acpi_asus_attach(device_t dev) /* Activate hotkeys */ AcpiEvaluateObject(sc->handle, "BSTS", NULL, NULL); + /* Configure wlan key. */ + acpi_SetInteger(sc->handle, "WAPF", acpi_asus_wapf); + /* Handle notifies */ if (sc->model->n_func == NULL) sc->model->n_func = acpi_asus_notify; -- John Baldwin