--- linux-2.6.14.5_orig/drivers/acpi/asus_acpi.c 2005-12-27 01:26:33.000000000 +0100 +++ linux-2.6.14.5/drivers/acpi/asus_acpi.c 2005-12-28 00:15:05.674647664 +0100 @@ -48,6 +48,7 @@ #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 + W5A, //W5A - 8012, W5000, W5655AUP //(Centrino) END_MODEL } model; //Models currently supported @@ -353,7 +358,18 @@ .brightness_set = "SPLV", .brightness_get = "GPLV", .display_set = "SDSP", - .display_get = "\\ADVG"} + .display_get = "\\ADVG"}, + + { + .name = "W5A", + .mt_bled = "BLED", + .mt_wled = "WLED", + .display_get = "\\SSTE", + .display_set = "SDSP", + .brightness_set = "SPLV", + .brightness_get = "GPLV", + .mt_lcd_switch = xxN_PREFIX "_Q10", + .lcd_status = "\\VGAF"} }; /* procdir we use */ @@ -581,6 +597,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 +912,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 +952,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 +1094,9 @@ hotk->model = S2x; else if (strncmp(model->string.pointer, "L5", 2) == 0) hotk->model = L5x; + else if (strncmp(model->string.pointer, "W5A", 3) == 0) + hotk->model = W5A; + if (hotk->model == END_MODEL) { printk("unsupported, trying default values, supply the "