diff options
Diffstat (limited to 'drivers/acpi/asus_acpi.c')
-rw-r--r-- | drivers/acpi/asus_acpi.c | 55 |
1 files changed, 45 insertions, 10 deletions
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index d915fec9bf63..d25ef961415c 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c | |||
@@ -142,6 +142,7 @@ struct asus_hotk { | |||
142 | xxN, //M2400N, M3700N, M5200N, M6800N, S1300N, S5200N | 142 | xxN, //M2400N, M3700N, M5200N, M6800N, S1300N, S5200N |
143 | A4S, //Z81sp | 143 | A4S, //Z81sp |
144 | //(Centrino) | 144 | //(Centrino) |
145 | F3Sa, | ||
145 | END_MODEL | 146 | END_MODEL |
146 | } model; //Models currently supported | 147 | } model; //Models currently supported |
147 | u16 event_count[128]; //count for each event TODO make this better | 148 | u16 event_count[128]; //count for each event TODO make this better |
@@ -405,7 +406,20 @@ static struct model_data model_conf[END_MODEL] = { | |||
405 | .brightness_get = "GPLV", | 406 | .brightness_get = "GPLV", |
406 | .mt_bt_switch = "BLED", | 407 | .mt_bt_switch = "BLED", |
407 | .mt_wled = "WLED" | 408 | .mt_wled = "WLED" |
408 | } | 409 | }, |
410 | |||
411 | { | ||
412 | .name = "F3Sa", | ||
413 | .mt_bt_switch = "BLED", | ||
414 | .mt_wled = "WLED", | ||
415 | .mt_mled = "MLED", | ||
416 | .brightness_get = "GPLV", | ||
417 | .brightness_set = "SPLV", | ||
418 | .mt_lcd_switch = "\\_SB.PCI0.SBRG.EC0._Q10", | ||
419 | .lcd_status = "\\_SB.PCI0.SBRG.EC0.RPIN", | ||
420 | .display_get = "\\ADVG", | ||
421 | .display_set = "SDSP", | ||
422 | }, | ||
409 | 423 | ||
410 | }; | 424 | }; |
411 | 425 | ||
@@ -710,15 +724,8 @@ static int get_lcd_state(void) | |||
710 | { | 724 | { |
711 | int lcd = 0; | 725 | int lcd = 0; |
712 | 726 | ||
713 | if (hotk->model != L3H) { | 727 | if (hotk->model == L3H) { |
714 | /* We don't have to check anything if we are here */ | 728 | /* L3H and the like have to be handled differently */ |
715 | if (!read_acpi_int(NULL, hotk->methods->lcd_status, &lcd)) | ||
716 | printk(KERN_WARNING | ||
717 | "Asus ACPI: Error reading LCD status\n"); | ||
718 | |||
719 | if (hotk->model == L2D) | ||
720 | lcd = ~lcd; | ||
721 | } else { /* L3H and the like have to be handled differently */ | ||
722 | acpi_status status = 0; | 729 | acpi_status status = 0; |
723 | struct acpi_object_list input; | 730 | struct acpi_object_list input; |
724 | union acpi_object mt_params[2]; | 731 | union acpi_object mt_params[2]; |
@@ -745,6 +752,32 @@ static int get_lcd_state(void) | |||
745 | if (out_obj.type == ACPI_TYPE_INTEGER) | 752 | if (out_obj.type == ACPI_TYPE_INTEGER) |
746 | /* That's what the AML code does */ | 753 | /* That's what the AML code does */ |
747 | lcd = out_obj.integer.value >> 8; | 754 | lcd = out_obj.integer.value >> 8; |
755 | } else if (hotk->model == F3Sa) { | ||
756 | unsigned long tmp; | ||
757 | union acpi_object param; | ||
758 | struct acpi_object_list input; | ||
759 | acpi_status status; | ||
760 | |||
761 | /* Read pin 11 */ | ||
762 | param.type = ACPI_TYPE_INTEGER; | ||
763 | param.integer.value = 0x11; | ||
764 | input.count = 1; | ||
765 | input.pointer = ¶m; | ||
766 | |||
767 | status = acpi_evaluate_integer(NULL, hotk->methods->lcd_status, | ||
768 | &input, &tmp); | ||
769 | if (status != AE_OK) | ||
770 | return -1; | ||
771 | |||
772 | lcd = tmp; | ||
773 | } else { | ||
774 | /* We don't have to check anything if we are here */ | ||
775 | if (!read_acpi_int(NULL, hotk->methods->lcd_status, &lcd)) | ||
776 | printk(KERN_WARNING | ||
777 | "Asus ACPI: Error reading LCD status\n"); | ||
778 | |||
779 | if (hotk->model == L2D) | ||
780 | lcd = ~lcd; | ||
748 | } | 781 | } |
749 | 782 | ||
750 | return (lcd & 1); | 783 | return (lcd & 1); |
@@ -1134,6 +1167,8 @@ static int asus_model_match(char *model) | |||
1134 | return W5A; | 1167 | return W5A; |
1135 | else if (strncmp(model, "A4S", 3) == 0) | 1168 | else if (strncmp(model, "A4S", 3) == 0) |
1136 | return A4S; | 1169 | return A4S; |
1170 | else if (strncmp(model, "F3Sa", 4) == 0) | ||
1171 | return F3Sa; | ||
1137 | else | 1172 | else |
1138 | return END_MODEL; | 1173 | return END_MODEL; |
1139 | } | 1174 | } |