diff -Nur linux-2.6.15.orig/drivers/acpi/asus_acpi.c linux-2.6.15/drivers/acpi/asus_acpi.c --- linux-2.6.15.orig/drivers/acpi/asus_acpi.c 2006-01-03 04:21:10.000000000 +0100 +++ linux-2.6.15/drivers/acpi/asus_acpi.c 2006-01-12 04:12:31.048093432 +0100 @@ -42,12 +42,13 @@ #include #include -#define ASUS_ACPI_VERSION "0.29" +#define ASUS_ACPI_VERSION "0.29.1" #define PROC_ASUS "asus" //the directory #define PROC_MLED "mled" #define PROC_WLED "wled" #define PROC_TLED "tled" +#define PROC_BLED "bled" #define PROC_INFO "info" #define PROC_LCD "lcd" #define PROC_BRN "brn" @@ -70,6 +71,7 @@ #define MLED_ON 0x01 //is MLED ON ? #define WLED_ON 0x02 #define TLED_ON 0x04 +#define BLED_ON 0x08 MODULE_AUTHOR("Julien Lerouge, Karol Kozimor"); MODULE_DESCRIPTION(ACPI_HOTK_NAME); @@ -93,6 +95,8 @@ char *mt_tled; //method to handle tled_____________R char *tled_status; //node to handle tled reading_______A char *mt_lcd_switch; //method to turn LCD ON/OFF_________A + char *mt_bled; //method to handle bled_____________R + char *bled_status; //node to handle bled reading_______A char *lcd_status; //node to read LCD panel state______A char *brightness_up; //method to set brightness up_______A char *brightness_down; //guess what ?______________________A @@ -132,6 +136,7 @@ S1x, //S1300A, but also L1400B and M2400A (L84F) S2x, //S200 (J1 reported), Victor MP-XP7210 xxN, //M2400N, M3700N, M5200N, S1300N, S5200N, W1OOON + Wxx, //W5x - W5A, W5000, W5655AUP, W6x //(Centrino) END_MODEL } model; //Models currently supported @@ -146,6 +151,7 @@ #define S1x_PREFIX "\\_SB.PCI0.PX40." #define S2x_PREFIX A1x_PREFIX #define xxN_PREFIX "\\_SB.PCI0.SBRG.EC0." +#define Wxx_PREFIX xxN_PREFIX static struct model_data model_conf[END_MODEL] = { /* @@ -353,7 +359,18 @@ .brightness_set = "SPLV", .brightness_get = "GPLV", .display_set = "SDSP", - .display_get = "\\ADVG"} + .display_get = "\\ADVG"}, + + { + .name = "Wxx", + .mt_bled = "BLED", + .mt_wled = "WLED", + .mt_lcd_switch = Wxx_PREFIX "_Q10", + .lcd_status = "\\VGAF", + .brightness_set = "SPLV", + .brightness_get = "GPLV", + .display_set = "SDSP", + .display_get = "\\_SB.PCI0.P0P2.VGA.GETD"} }; /* procdir we use */ @@ -581,6 +598,23 @@ } /* + * Proc handlers for BLED + */ +static int +proc_read_bled(char *page, char **start, off_t off, int count, int *eof, + void *data) +{ + return sprintf(page, "%d\n", read_led(hotk->methods->bled_status, BLED_ON)); +} + +static int +proc_write_bled(struct file *file, const char __user *buffer, + unsigned long count, void *data) +{ + return write_led(buffer, count, hotk->methods->mt_bled, BLED_ON, 0); +} + +/* * Proc handlers for TLED */ static int @@ -879,6 +913,10 @@ mode, device); } + if (hotk->methods->mt_bled) { + asus_proc_add(PROC_BLED, &proc_write_bled, &proc_read_bled, mode, device); + } + if (hotk->methods->mt_tled) { asus_proc_add(PROC_TLED, &proc_write_tled, &proc_read_tled, mode, device); @@ -915,6 +953,8 @@ remove_proc_entry(PROC_WLED, acpi_device_dir(device)); if (hotk->methods->mt_mled) remove_proc_entry(PROC_MLED, acpi_device_dir(device)); + if (hotk->methods->mt_bled) + remove_proc_entry(PROC_BLED,acpi_device_dir(device)); if (hotk->methods->mt_tled) remove_proc_entry(PROC_TLED, acpi_device_dir(device)); if (hotk->methods->mt_lcd_switch && hotk->methods->lcd_status) @@ -1055,6 +1095,10 @@ hotk->model = S2x; else if (strncmp(model->string.pointer, "L5", 2) == 0) hotk->model = L5x; + else if (strncmp(model->string.pointer, "W5", 2) == 0 || + strncmp(model->string.pointer, "W6", 2) == 0) + hotk->model = Wxx; + if (hotk->model == END_MODEL) { printk("unsupported, trying default values, supply the "