lkml.org 
[lkml]   [2005]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] asus_acpi M6000A model support
Hello,

here is patch for Asus M6A laptop support. It works fine for me.

--
Lukáš Hejtmánek
--- asus_acpi.c.old 2005-04-21 02:03:13.000000000 +0200
+++ asus_acpi.c 2005-05-08 18:22:49.000000000 +0200
@@ -128,6 +128,7 @@
L8L, //L8400L
M1A, //M1300A
M2E, //M2400E, L4400L
+ M6A, //M6000A
M6N, //M6800N
M6R, //M6700R
P30, //Samsung P30
@@ -304,7 +305,20 @@
.display_set = "SDSP",
.display_get = "\\INFB"
},
-
+ {
+ .name = "M6A",
+ /* M6A does not have MLED */
+ .mt_wled = "WLED",
+ .mt_lcd_switch = xxN_PREFIX "_Q10",
+ .lcd_status = "\\RGPL",
+ .brightness_set = "SPLV",
+ .brightness_get = "GPLV",
+ .display_set = "SDSP",
+ /* FIXME: this is not correct display_get.
+ * It always returns 1
+ * */
+ .display_get = "\\ADVG"
+ },
{
.name = "M6N",
.mt_mled = "MLED",
@@ -622,7 +636,7 @@
{
int lcd = 0;

- if (hotk->model != L3H) {
+ if (hotk->model != L3H && hotk->model != M6A) {
/* We don't have to check anything if we are here */
if (!read_acpi_int(NULL, hotk->methods->lcd_status, &lcd))
printk(KERN_WARNING "Asus ACPI: Error reading LCD status\n");
@@ -638,22 +652,33 @@

input.count = 2;
input.pointer = mt_params;
- /* Note: the following values are partly guessed up, but
- otherwise they seem to work */
mt_params[0].type = ACPI_TYPE_INTEGER;
- mt_params[0].integer.value = 0x02;
mt_params[1].type = ACPI_TYPE_INTEGER;
- mt_params[1].integer.value = 0x02;
+ if(hotk->model == L3H) {
+ /* Note: the following values are partly guessed up,
+ * but otherwise they seem to work */
+ mt_params[0].integer.value = 0x02;
+ mt_params[1].integer.value = 0x02;
+ } else if(hotk->model == M6A) {
+ mt_params[0].integer.value = 0x15;
+ mt_params[1].integer.value = 0x01;
+ }

output.length = sizeof(out_obj);
output.pointer = &out_obj;

- status = acpi_evaluate_object(NULL, hotk->methods->lcd_status, &input, &output);
+ status = acpi_evaluate_object(NULL, hotk->methods->lcd_status,
+ &input, &output);
if (status != AE_OK)
return -1;
- if (out_obj.type == ACPI_TYPE_INTEGER)
- /* That's what the AML code does */
- lcd = out_obj.integer.value >> 8;
+ if (out_obj.type == ACPI_TYPE_INTEGER) {
+ if(hotk->model== L3H) {
+ /* That's what the AML code does */
+ lcd = out_obj.integer.value >> 8;
+ } else if(hotk->model == M6A) {
+ lcd = out_obj.integer.value;
+ }
+ }
}

return (lcd & 1);
@@ -1029,6 +1054,8 @@
hotk->model = M6N;
else if (strncmp(model->string.pointer, "M6R", 3) == 0)
hotk->model = M6R;
+ else if (strncmp(model->string.pointer, "M6A", 3) == 0)
+ hotk->model = M6A;
else if (strncmp(model->string.pointer, "M2N", 3) == 0 ||
strncmp(model->string.pointer, "M3N", 3) == 0 ||
strncmp(model->string.pointer, "M5N", 3) == 0 ||
@@ -1058,8 +1085,9 @@
hotk->model = L5x;

if (hotk->model == END_MODEL) {
- printk("unsupported, trying default values, supply the "
- "developers with your DSDT\n");
+ printk("unsupported model %s, trying default values, supply "
+ "the developers with your DSDT\n",
+ model->string.pointer);
hotk->model = M2E;
} else {
printk("supported\n");
\
 
 \ /
  Last update: 2005-08-23 15:16    [W:2.736 / U:0.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site