ACPI for Asus Notebook N50Vc
John Baldwin
jhb at freebsd.org
Tue Feb 21 18:58:33 UTC 2012
On Monday, February 13, 2012 6:38:26 pm simplicissimus wrote:
> Hello John,
>
> Thank you very much for your patch.
>
> This is how my laptop’s behaviour changed:
>
> % sysctl -a | grep -i asus
> hw.acpi.asus.lcd_brightness: 4
> dev.acpi.0.%desc: _ASUS_ Notebook
> dev.acpi_asus.0.%desc: Asus N50Vc Laptop Extras
> dev.acpi_asus.0.%driver: acpi_asus
> dev.acpi_asus.0.%location: handle=\_SB_.ATKD
> dev.acpi_asus.0.%pnpinfo: _HID=ATK0100 _UID=16843008
> dev.acpi_asus.0.%parent: acpi0
>
> hw.acpi.asus.lcd_brightness shows the correct brightness (with acpi_video
> loaded).
>
> My notebook has a combined switch for wifi/bluetooth.
> Without (the modified) acpi_asus the Wifi LED would be always off, although
> wifi worked.
> By pressing the button, bluetooth was toggled on/off with the corresponding
> LED going on/off.
>
> Now the button cycles through these LED statuses:
> both on > both off > wifi only > bluetooth only
> Wifi stays on all the time, bluetooth works as it is supposed to (like it
> did before).
>
> Is there a chance to get ATK0110 events working? I tried xev, but had no
> output there.
>
> Thanks in advance
Can you try this? BTW, someone should port the asus-laptop.c driver from
Linux over to replace acpi_asus.c.
Index: acpi_asus.c
===================================================================
--- acpi_asus.c (revision 231973)
+++ 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_FETCH("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);
@@ -724,6 +739,8 @@ acpi_asus_attach(device_t dev)
{
struct acpi_asus_softc *sc;
struct acpi_softc *acpi_sc;
+ ACPI_OBJECT Arg;
+ ACPI_OBJECT_LIST Args;
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
@@ -735,6 +752,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 +824,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
More information about the freebsd-acpi
mailing list