From: Lukas Hejtmanek <xhejtman@mail.muni.cz>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] asus_acpi M6000A model support
Date: Tue, 23 Aug 2005 15:14:14 +0200 [thread overview]
Message-ID: <20050823131414.GC12364@mail.muni.cz> (raw)
[-- Attachment #1: Type: text/plain, Size: 94 bytes --]
Hello,
here is patch for Asus M6A laptop support. It works fine for me.
--
Lukáš Hejtmánek
[-- Attachment #2: acpi-patch --]
[-- Type: text/plain, Size: 3224 bytes --]
--- 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");
reply other threads:[~2005-08-23 13:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050823131414.GC12364@mail.muni.cz \
--to=xhejtman@mail.muni.cz \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®