* [PATCH 1/1] ACPI: asus_acpi, support F2JE model
@ 2007-04-11 9:33 ` Jiri Slaby
0 siblings, 0 replies; 21+ messages in thread
From: Jiri Slaby @ 2007-04-11 9:33 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, corentincj, sziwan, acpi4asus-user, len.brown, linux-acpi
asus_acpi, support F2JE model
also augment the driver to support switching LCD status even if no function
for getting lcd status doesn't exist in DSDT.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit 4e55effd524fffae1113c301d63d4cd5280264ab
tree 96d1c15a7ee82558bcbf1bb4b6e66c435781758d
parent 0156510dee9d326af2ec52cf8b1a388ce9a839e9
author Jiri Slaby <jirislaby@gmail.com> Wed, 11 Apr 2007 11:28:34 +0200
committer Jiri Slaby <jirislaby@gmail.com> Wed, 11 Apr 2007 11:28:34 +0200
drivers/acpi/asus_acpi.c | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index 0a9ea00..e9c1630 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -123,6 +123,7 @@ struct asus_hotk {
A2x, //A2500H
A4G, //A4700G
D1x, //D1
+ F2x, //F2JE
L2D, //L2000D
L3C, //L3800C
L3D, //L3400D
@@ -150,6 +151,7 @@ struct asus_hotk {
/* Here we go */
#define A1x_PREFIX "\\_SB.PCI0.ISA.EC0."
+#define F2x_PREFIX "\\_SB.PCI0.SBRG.EC0."
#define L3C_PREFIX "\\_SB.PCI0.PX40.ECD0."
#define M1A_PREFIX "\\_SB.PCI0.PX40.EC0."
#define P30_PREFIX "\\_SB.PCI0.LPCB.EC0."
@@ -206,6 +208,17 @@ static struct model_data model_conf[END_MODEL] = {
.display_get = "\\INFB"},
{
+ .name = "F2x",
+ .mt_wled = "WLED",
+ .mt_bt_switch = "BLED",
+ .mt_lcd_switch = F2x_PREFIX "_Q10",
+ .lcd_status = "",
+ .brightness_set = "SPLV",
+ .brightness_get = "GPLV",
+ .display_set = "SDSP",
+ .display_get = "\\ADVG"},
+
+ {
.name = "L2D",
.mt_mled = "MLED",
.mled_status = "\\SGP6",
@@ -706,6 +719,8 @@ static int get_lcd_state(void)
{
int lcd = 0;
+ BUG_ON(!*hotk->methods->lcd_status);
+
if (hotk->model != L3H) {
/* We don't have to check anything if we are here */
if (!read_acpi_int(NULL, hotk->methods->lcd_status, &lcd))
@@ -748,11 +763,17 @@ static int get_lcd_state(void)
static int set_lcd_state(int value)
{
- int lcd = 0;
acpi_status status = 0;
- lcd = value ? 1 : 0;
- if (lcd != get_lcd_state()) {
+ if (!value && !*hotk->methods->lcd_status) {
+ printk(KERN_ERR "You must pass nonzero value to switch LCD "
+ "status for this model\n");
+ return -EINVAL;
+ }
+
+ /* pay attention to lazy evaluation, we don't want to reach
+ get_lcd_state if lcd_status is empty string */
+ if (!*hotk->methods->lcd_status || !!value != get_lcd_state()) {
/* switch */
if (hotk->model != L3H) {
status =
@@ -778,7 +799,9 @@ static int
proc_read_lcd(char *page, char **start, off_t off, int count, int *eof,
void *data)
{
- return sprintf(page, "%d\n", get_lcd_state());
+ return *hotk->methods->lcd_status ?
+ sprintf(page, "%d\n", get_lcd_state()) :
+ sprintf(page, "n/a (but 1 may be written to switch LCD)\n");
}
static int
@@ -1091,6 +1114,8 @@ static int asus_model_match(char *model)
return L8L;
else if (strncmp(model, "L4R", 3) == 0)
return L4R;
+ else if (strncmp(model, "F2JE", 4) == 0)
+ return F2x;
else if (strncmp(model, "M6N", 3) == 0 || strncmp(model, "W3N", 3) == 0)
return M6N;
else if (strncmp(model, "M6R", 3) == 0 || strncmp(model, "A3G", 3) == 0)
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 1/1] ACPI: asus_acpi, support F2JE model
@ 2007-04-11 9:33 ` Jiri Slaby
0 siblings, 0 replies; 21+ messages in thread
From: Jiri Slaby @ 2007-04-11 9:33 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, corentincj, sziwan, acpi4asus-user, len.brown, linux-acpi
asus_acpi, support F2JE model
also augment the driver to support switching LCD status even if no function
for getting lcd status doesn't exist in DSDT.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit 4e55effd524fffae1113c301d63d4cd5280264ab
tree 96d1c15a7ee82558bcbf1bb4b6e66c435781758d
parent 0156510dee9d326af2ec52cf8b1a388ce9a839e9
author Jiri Slaby <jirislaby@gmail.com> Wed, 11 Apr 2007 11:28:34 +0200
committer Jiri Slaby <jirislaby@gmail.com> Wed, 11 Apr 2007 11:28:34 +0200
drivers/acpi/asus_acpi.c | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index 0a9ea00..e9c1630 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -123,6 +123,7 @@ struct asus_hotk {
A2x, //A2500H
A4G, //A4700G
D1x, //D1
+ F2x, //F2JE
L2D, //L2000D
L3C, //L3800C
L3D, //L3400D
@@ -150,6 +151,7 @@ struct asus_hotk {
/* Here we go */
#define A1x_PREFIX "\\_SB.PCI0.ISA.EC0."
+#define F2x_PREFIX "\\_SB.PCI0.SBRG.EC0."
#define L3C_PREFIX "\\_SB.PCI0.PX40.ECD0."
#define M1A_PREFIX "\\_SB.PCI0.PX40.EC0."
#define P30_PREFIX "\\_SB.PCI0.LPCB.EC0."
@@ -206,6 +208,17 @@ static struct model_data model_conf[END_MODEL] = {
.display_get = "\\INFB"},
{
+ .name = "F2x",
+ .mt_wled = "WLED",
+ .mt_bt_switch = "BLED",
+ .mt_lcd_switch = F2x_PREFIX "_Q10",
+ .lcd_status = "",
+ .brightness_set = "SPLV",
+ .brightness_get = "GPLV",
+ .display_set = "SDSP",
+ .display_get = "\\ADVG"},
+
+ {
.name = "L2D",
.mt_mled = "MLED",
.mled_status = "\\SGP6",
@@ -706,6 +719,8 @@ static int get_lcd_state(void)
{
int lcd = 0;
+ BUG_ON(!*hotk->methods->lcd_status);
+
if (hotk->model != L3H) {
/* We don't have to check anything if we are here */
if (!read_acpi_int(NULL, hotk->methods->lcd_status, &lcd))
@@ -748,11 +763,17 @@ static int get_lcd_state(void)
static int set_lcd_state(int value)
{
- int lcd = 0;
acpi_status status = 0;
- lcd = value ? 1 : 0;
- if (lcd != get_lcd_state()) {
+ if (!value && !*hotk->methods->lcd_status) {
+ printk(KERN_ERR "You must pass nonzero value to switch LCD "
+ "status for this model\n");
+ return -EINVAL;
+ }
+
+ /* pay attention to lazy evaluation, we don't want to reach
+ get_lcd_state if lcd_status is empty string */
+ if (!*hotk->methods->lcd_status || !!value != get_lcd_state()) {
/* switch */
if (hotk->model != L3H) {
status =
@@ -778,7 +799,9 @@ static int
proc_read_lcd(char *page, char **start, off_t off, int count, int *eof,
void *data)
{
- return sprintf(page, "%d\n", get_lcd_state());
+ return *hotk->methods->lcd_status ?
+ sprintf(page, "%d\n", get_lcd_state()) :
+ sprintf(page, "n/a (but 1 may be written to switch LCD)\n");
}
static int
@@ -1091,6 +1114,8 @@ static int asus_model_match(char *model)
return L8L;
else if (strncmp(model, "L4R", 3) == 0)
return L4R;
+ else if (strncmp(model, "F2JE", 4) == 0)
+ return F2x;
else if (strncmp(model, "M6N", 3) == 0 || strncmp(model, "W3N", 3) == 0)
return M6N;
else if (strncmp(model, "M6R", 3) == 0 || strncmp(model, "A3G", 3) == 0)
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
2007-04-11 9:33 ` Jiri Slaby
@ 2007-04-11 13:05 ` Corentin CHARY
-1 siblings, 0 replies; 21+ messages in thread
From: Corentin CHARY @ 2007-04-11 13:05 UTC (permalink / raw)
To: Jiri Slaby
Cc: Andrew Morton, linux-kernel, sziwan, acpi4asus-user, len.brown,
linux-acpi
Le Wednesday 11 April 2007 11:33:48 Jiri Slaby, vous avez écrit :
> asus_acpi, support F2JE model
Just use the new asus-laptop driver =)
(see acpi4asus-0.40)
--
CHARY 'Iksaif' Corentin
http://xf.iksaif.net
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
@ 2007-04-11 13:05 ` Corentin CHARY
0 siblings, 0 replies; 21+ messages in thread
From: Corentin CHARY @ 2007-04-11 13:05 UTC (permalink / raw)
To: Jiri Slaby
Cc: Andrew Morton, linux-kernel, sziwan, acpi4asus-user, len.brown,
linux-acpi
Le Wednesday 11 April 2007 11:33:48 Jiri Slaby, vous avez écrit :
> asus_acpi, support F2JE model
Just use the new asus-laptop driver =)
(see acpi4asus-0.40)
--
CHARY 'Iksaif' Corentin
http://xf.iksaif.net
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
2007-04-11 9:33 ` Jiri Slaby
(?)
(?)
@ 2007-04-11 13:10 ` Jiri Slaby
-1 siblings, 0 replies; 21+ messages in thread
From: Jiri Slaby @ 2007-04-11 13:10 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, corentincj, sziwan, acpi4asus-user, len.brown, linux-acpi
Jiri Slaby napsal(a):
> asus_acpi, support F2JE model
Ignore this one, newer version has been sent.
regards,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8 22A0 32CC 55C3 39D4 7A7E
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
2007-04-11 13:05 ` Corentin CHARY
(?)
@ 2007-04-11 13:46 ` Jiri Slaby
2007-04-11 18:18 ` Danny Kukawka
-1 siblings, 1 reply; 21+ messages in thread
From: Jiri Slaby @ 2007-04-11 13:46 UTC (permalink / raw)
To: corentincj
Cc: Andrew Morton, linux-kernel, sziwan, acpi4asus-user, len.brown,
linux-acpi
Corentin CHARY napsal(a):
> Le Wednesday 11 April 2007 11:33:48 Jiri Slaby, vous avez écrit :
>> asus_acpi, support F2JE model
> Just use the new asus-laptop driver =)
> (see acpi4asus-0.40)
code seems good, but this is not so good:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
#warning "This module does not support 2.6.20 yet, wait for a new release =)"
#endif
When do you plan to support latest kernels and merge it to mainline?
thanks,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8 22A0 32CC 55C3 39D4 7A7E
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
2007-04-11 13:46 ` Jiri Slaby
@ 2007-04-11 18:18 ` Danny Kukawka
0 siblings, 0 replies; 21+ messages in thread
From: Danny Kukawka @ 2007-04-11 18:18 UTC (permalink / raw)
To: Jiri Slaby; +Cc: linux-acpi, linux-kernel, acpi4asus-user, corentincj, sziwan
Jiri Slaby wrote:
> Corentin CHARY napsal(a):
>> Le Wednesday 11 April 2007 11:33:48 Jiri Slaby, vous avez écrit :
>>> asus_acpi, support F2JE model
>> Just use the new asus-laptop driver =)
>> (see acpi4asus-0.40)
>
> code seems good, but this is not so good:
> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
> #warning "This module does not support 2.6.20 yet, wait for a new release
> #=)" endif
>
> When do you plan to support latest kernels and merge it to mainline?
This patch fixes acpi4asus-0.40 for me at least with 2.6.20 on a ASUS R1F.
Danny
Signed-off-by: Danny Kukawka <dkukawka@suse.de>
---
asus-laptop.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
--- acpi4asus-0.40/driver/asus-laptop.c 2007-02-13 17:42:51.000000000 +0100
+++ acpi4asus-0.40/driver/asus-laptop.c 2007-04-11 20:12:49.000000000 +0200
@@ -41,8 +41,8 @@
# include <linux/autoconf.h>
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
-#warning "This module does not support 2.6.20 yet, wait for a new release =)"
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+#warning "This module does not support 2.6.21 yet, wait for a new release =)"
#endif
#include <linux/kernel.h>
@@ -226,8 +226,8 @@
static void object##_led_set(struct led_classdev *led_cdev, \
enum led_brightness value); \
static int object##_led_wk; \
- static void object##_led_update(void *data); \
- DECLARE_WORK(object##_led_work, object##_led_update, NULL); \
+ static void object##_led_update(struct work_struct *dummy); \
+ DECLARE_WORK(object##_led_work, object##_led_update); \
static struct led_classdev object##_led = { \
.name = "asus:" ledname, \
.brightness_set = object##_led_set, \
@@ -329,7 +329,7 @@
object##_led_wk = value; \
queue_work(led_workqueue, &object##_led_work); \
} \
- static void object##_led_update(void * data) \
+ static void object##_led_update(struct work_struct *dummy) \
{ \
int value = object##_led_wk; \
write_status(object##_set_handle, value, (mask)); \
@@ -1053,8 +1053,7 @@
struct backlight_device *bd;
if(brightness_set_handle && lcd_switch_handle) {
- bd = backlight_device_register (ASUS_HOTK_FILE, NULL,
- &asusbl_data);
+ bd = backlight_device_register (ASUS_HOTK_FILE, NULL, NULL, &asusbl_data);
if (IS_ERR (bd)) {
printk(ASUS_ERR
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
@ 2007-04-11 18:18 ` Danny Kukawka
0 siblings, 0 replies; 21+ messages in thread
From: Danny Kukawka @ 2007-04-11 18:18 UTC (permalink / raw)
To: Jiri Slaby; +Cc: linux-acpi, linux-kernel, acpi4asus-user, corentincj, sziwan
Jiri Slaby wrote:
> Corentin CHARY napsal(a):
>> Le Wednesday 11 April 2007 11:33:48 Jiri Slaby, vous avez écrit :
>>> asus_acpi, support F2JE model
>> Just use the new asus-laptop driver =)
>> (see acpi4asus-0.40)
>
> code seems good, but this is not so good:
> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
> #warning "This module does not support 2.6.20 yet, wait for a new release
> #=)" endif
>
> When do you plan to support latest kernels and merge it to mainline?
This patch fixes acpi4asus-0.40 for me at least with 2.6.20 on a ASUS R1F.
Danny
Signed-off-by: Danny Kukawka <dkukawka@suse.de>
---
asus-laptop.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
--- acpi4asus-0.40/driver/asus-laptop.c 2007-02-13 17:42:51.000000000 +0100
+++ acpi4asus-0.40/driver/asus-laptop.c 2007-04-11 20:12:49.000000000 +0200
@@ -41,8 +41,8 @@
# include <linux/autoconf.h>
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
-#warning "This module does not support 2.6.20 yet, wait for a new release =)"
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+#warning "This module does not support 2.6.21 yet, wait for a new release =)"
#endif
#include <linux/kernel.h>
@@ -226,8 +226,8 @@
static void object##_led_set(struct led_classdev *led_cdev, \
enum led_brightness value); \
static int object##_led_wk; \
- static void object##_led_update(void *data); \
- DECLARE_WORK(object##_led_work, object##_led_update, NULL); \
+ static void object##_led_update(struct work_struct *dummy); \
+ DECLARE_WORK(object##_led_work, object##_led_update); \
static struct led_classdev object##_led = { \
.name = "asus:" ledname, \
.brightness_set = object##_led_set, \
@@ -329,7 +329,7 @@
object##_led_wk = value; \
queue_work(led_workqueue, &object##_led_work); \
} \
- static void object##_led_update(void * data) \
+ static void object##_led_update(struct work_struct *dummy) \
{ \
int value = object##_led_wk; \
write_status(object##_set_handle, value, (mask)); \
@@ -1053,8 +1053,7 @@
struct backlight_device *bd;
if(brightness_set_handle && lcd_switch_handle) {
- bd = backlight_device_register (ASUS_HOTK_FILE, NULL,
- &asusbl_data);
+ bd = backlight_device_register (ASUS_HOTK_FILE, NULL, NULL, &asusbl_data);
if (IS_ERR (bd)) {
printk(ASUS_ERR
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
2007-04-11 18:18 ` Danny Kukawka
@ 2007-04-11 18:32 ` Danny Kukawka
-1 siblings, 0 replies; 21+ messages in thread
From: Danny Kukawka @ 2007-04-11 18:32 UTC (permalink / raw)
To: Jiri Slaby; +Cc: linux-acpi, linux-kernel, acpi4asus-user, corentincj, sziwan
On Mittwoch, 11. April 2007, Danny Kukawka wrote:
> Jiri Slaby wrote:
> > Corentin CHARY napsal(a):
> >> Le Wednesday 11 April 2007 11:33:48 Jiri Slaby, vous avez écrit :
> >>> asus_acpi, support F2JE model
> >> Just use the new asus-laptop driver =)
> >> (see acpi4asus-0.40)
> >
> > code seems good, but this is not so good:
> > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
> > #warning "This module does not support 2.6.20 yet, wait for a new release
> > #=)" endif
> >
> > When do you plan to support latest kernels and merge it to mainline?
>
> This patch fixes acpi4asus-0.40 for me at least with 2.6.20 on a ASUS R1F.
Btw. looks as if a new version of the driver (v0.41) is already in the mm-tree.
Danny
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
@ 2007-04-11 18:32 ` Danny Kukawka
0 siblings, 0 replies; 21+ messages in thread
From: Danny Kukawka @ 2007-04-11 18:32 UTC (permalink / raw)
To: Jiri Slaby; +Cc: linux-acpi, linux-kernel, acpi4asus-user, corentincj, sziwan
On Mittwoch, 11. April 2007, Danny Kukawka wrote:
> Jiri Slaby wrote:
> > Corentin CHARY napsal(a):
> >> Le Wednesday 11 April 2007 11:33:48 Jiri Slaby, vous avez écrit :
> >>> asus_acpi, support F2JE model
> >> Just use the new asus-laptop driver =)
> >> (see acpi4asus-0.40)
> >
> > code seems good, but this is not so good:
> > #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
> > #warning "This module does not support 2.6.20 yet, wait for a new release
> > #=)" endif
> >
> > When do you plan to support latest kernels and merge it to mainline?
>
> This patch fixes acpi4asus-0.40 for me at least with 2.6.20 on a ASUS R1F.
Btw. looks as if a new version of the driver (v0.41) is already in the mm-tree.
Danny
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
2007-04-11 18:32 ` Danny Kukawka
@ 2007-04-11 19:23 ` Jiri Slaby
-1 siblings, 0 replies; 21+ messages in thread
From: Jiri Slaby @ 2007-04-11 19:23 UTC (permalink / raw)
To: Danny Kukawka
Cc: Jiri Slaby, linux-acpi, linux-kernel, acpi4asus-user, corentincj, sziwan
Danny Kukawka napsal(a):
> On Mittwoch, 11. April 2007, Danny Kukawka wrote:
>> Jiri Slaby wrote:
>>> Corentin CHARY napsal(a):
>>>> Le Wednesday 11 April 2007 11:33:48 Jiri Slaby, vous avez écrit :
>>>>> asus_acpi, support F2JE model
>>>> Just use the new asus-laptop driver =)
>>>> (see acpi4asus-0.40)
>>> code seems good, but this is not so good:
>>> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
>>> #warning "This module does not support 2.6.20 yet, wait for a new release
>>> #=)" endif
>>>
>>> When do you plan to support latest kernels and merge it to mainline?
>> This patch fixes acpi4asus-0.40 for me at least with 2.6.20 on a ASUS R1F.
>
> Btw. looks as if a new version of the driver (v0.41) is already in the mm-tree.
Good to hear, I've got a look only to .21-rc6-mm1, where are no changes like
this (there is 0.30).
I'm satisfied, thanks,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8 22A0 32CC 55C3 39D4 7A7E
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
@ 2007-04-11 19:23 ` Jiri Slaby
0 siblings, 0 replies; 21+ messages in thread
From: Jiri Slaby @ 2007-04-11 19:23 UTC (permalink / raw)
To: Danny Kukawka
Cc: Jiri Slaby, linux-acpi, linux-kernel, acpi4asus-user, corentincj, sziwan
Danny Kukawka napsal(a):
> On Mittwoch, 11. April 2007, Danny Kukawka wrote:
>> Jiri Slaby wrote:
>>> Corentin CHARY napsal(a):
>>>> Le Wednesday 11 April 2007 11:33:48 Jiri Slaby, vous avez écrit :
>>>>> asus_acpi, support F2JE model
>>>> Just use the new asus-laptop driver =)
>>>> (see acpi4asus-0.40)
>>> code seems good, but this is not so good:
>>> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
>>> #warning "This module does not support 2.6.20 yet, wait for a new release
>>> #=)" endif
>>>
>>> When do you plan to support latest kernels and merge it to mainline?
>> This patch fixes acpi4asus-0.40 for me at least with 2.6.20 on a ASUS R1F.
>
> Btw. looks as if a new version of the driver (v0.41) is already in the mm-tree.
Good to hear, I've got a look only to .21-rc6-mm1, where are no changes like
this (there is 0.30).
I'm satisfied, thanks,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8 22A0 32CC 55C3 39D4 7A7E
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
2007-04-11 19:23 ` Jiri Slaby
(?)
@ 2007-04-11 19:43 ` Danny Kukawka
-1 siblings, 0 replies; 21+ messages in thread
From: Danny Kukawka @ 2007-04-11 19:43 UTC (permalink / raw)
To: Jiri Slaby; +Cc: linux-acpi, linux-kernel, acpi4asus-user, corentincj, sziwan
On Mittwoch, 11. April 2007, Jiri Slaby wrote:
> Danny Kukawka napsal(a):
> > Btw. looks as if a new version of the driver (v0.41) is already in the mm-tree.
>
> Good to hear, I've got a look only to .21-rc6-mm1, where are no changes like
> this (there is 0.30).
found in the latest mm snapshot under drivers/misc/
Danny
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
2007-04-11 21:06 ` Andrew Morton
@ 2007-04-11 21:17 ` Jiri Slaby
0 siblings, 0 replies; 21+ messages in thread
From: Jiri Slaby @ 2007-04-11 21:17 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, corentincj, sziwan, acpi4asus-user, len.brown, linux-acpi
Andrew Morton napsal(a):
> On Wed, 11 Apr 2007 22:37:03 +0200
> Jiri Slaby <jirislaby@gmail.com> wrote:
>
>> Jiri Slaby napsal(a):
>>> Side note, as Danny wrote, there is an asus-laptop driver sitting in -mm,
>>> which supersedes this one -- if you plan to push it upstream in the near
>>> future, don't bother with this patch.
>> Hmm, there is a 0.40 version in -rc6 yet. There is something weird with me
>> today.
>>
>
> I don't know what you mean by this.
Oh, 0.40 version, which is in 2.6.21-rc6's drivers/misc/ directory would
"contain" the changes, which are in my patch -- so I thought it's useless,
but the driver is still marked as EXPERIMENTAL, so:
> If your patch is still good then I'd be inclined to proceed with it - yes,
> there's a new driver in Len's tree but I assume we'll be maintaining the
> old one until the new one is proven to be a successful replacement.
as you wrote, we might want the patch for the old one to go through if
nobody has objections.
thanks, sorry for the confusion,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8 22A0 32CC 55C3 39D4 7A7E
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
2007-04-11 20:37 ` Jiri Slaby
@ 2007-04-11 21:06 ` Andrew Morton
2007-04-11 21:17 ` Jiri Slaby
0 siblings, 1 reply; 21+ messages in thread
From: Andrew Morton @ 2007-04-11 21:06 UTC (permalink / raw)
To: Jiri Slaby
Cc: linux-kernel, corentincj, sziwan, acpi4asus-user, len.brown, linux-acpi
On Wed, 11 Apr 2007 22:37:03 +0200
Jiri Slaby <jirislaby@gmail.com> wrote:
> Jiri Slaby napsal(a):
> > Side note, as Danny wrote, there is an asus-laptop driver sitting in -mm,
> > which supersedes this one -- if you plan to push it upstream in the near
> > future, don't bother with this patch.
>
> Hmm, there is a 0.40 version in -rc6 yet. There is something weird with me
> today.
>
I don't know what you mean by this.
If your patch is still good then I'd be inclined to proceed with it - yes,
there's a new driver in Len's tree but I assume we'll be maintaining the
old one until the new one is proven to be a successful replacement.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
2007-04-11 20:32 ` Jiri Slaby
@ 2007-04-11 20:37 ` Jiri Slaby
2007-04-11 21:06 ` Andrew Morton
0 siblings, 1 reply; 21+ messages in thread
From: Jiri Slaby @ 2007-04-11 20:37 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, corentincj, sziwan, acpi4asus-user, len.brown, linux-acpi
Jiri Slaby napsal(a):
> Side note, as Danny wrote, there is an asus-laptop driver sitting in -mm,
> which supersedes this one -- if you plan to push it upstream in the near
> future, don't bother with this patch.
Hmm, there is a 0.40 version in -rc6 yet. There is something weird with me
today.
regards,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8 22A0 32CC 55C3 39D4 7A7E
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
2007-04-11 20:20 ` Andrew Morton
(?)
@ 2007-04-11 20:32 ` Jiri Slaby
2007-04-11 20:37 ` Jiri Slaby
-1 siblings, 1 reply; 21+ messages in thread
From: Jiri Slaby @ 2007-04-11 20:32 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, corentincj, sziwan, acpi4asus-user, len.brown, linux-acpi
Andrew Morton napsal(a):
> On Wed, 11 Apr 2007 15:04:35 +0200 (CEST)
> Jiri Slaby <jirislaby@gmail.com> wrote:
>
>> @@ -706,6 +718,8 @@ static int get_lcd_state(void)
>> {
>> int lcd = 0;
>>
>> + BUG_ON(!hotk->methods->lcd_status);
>
> mutter. We could just warn-and-bale here.
>
> Hopefully this is just an is-jiri-sane assertion and it should never happen,
> no matter how busted the BIOS tables are?
Exactly :). Only if somebody changes the code around, so that it is called
with the method unset, it triggers and in that case it's definitely a bug.
Side note, as Danny wrote, there is an asus-laptop driver sitting in -mm,
which supersedes this one -- if you plan to push it upstream in the near
future, don't bother with this patch.
thanks,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8 22A0 32CC 55C3 39D4 7A7E
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
2007-04-11 13:04 ` Jiri Slaby
@ 2007-04-11 20:20 ` Andrew Morton
-1 siblings, 0 replies; 21+ messages in thread
From: Andrew Morton @ 2007-04-11 20:20 UTC (permalink / raw)
To: Jiri Slaby
Cc: linux-kernel, corentincj, sziwan, acpi4asus-user, len.brown, linux-acpi
On Wed, 11 Apr 2007 15:04:35 +0200 (CEST)
Jiri Slaby <jirislaby@gmail.com> wrote:
> @@ -706,6 +718,8 @@ static int get_lcd_state(void)
> {
> int lcd = 0;
>
> + BUG_ON(!hotk->methods->lcd_status);
mutter. We could just warn-and-bale here.
Hopefully this is just an is-jiri-sane assertion and it should never happen,
no matter how busted the BIOS tables are?
If it _does_ ever trigger, well, we just took out someone's machine
quite unnecessarily.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 1/1] ACPI: asus_acpi, support F2JE model
@ 2007-04-11 20:20 ` Andrew Morton
0 siblings, 0 replies; 21+ messages in thread
From: Andrew Morton @ 2007-04-11 20:20 UTC (permalink / raw)
To: Jiri Slaby
Cc: linux-kernel, corentincj, sziwan, acpi4asus-user, len.brown, linux-acpi
On Wed, 11 Apr 2007 15:04:35 +0200 (CEST)
Jiri Slaby <jirislaby@gmail.com> wrote:
> @@ -706,6 +718,8 @@ static int get_lcd_state(void)
> {
> int lcd = 0;
>
> + BUG_ON(!hotk->methods->lcd_status);
mutter. We could just warn-and-bale here.
Hopefully this is just an is-jiri-sane assertion and it should never happen,
no matter how busted the BIOS tables are?
If it _does_ ever trigger, well, we just took out someone's machine
quite unnecessarily.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH 1/1] ACPI: asus_acpi, support F2JE model
@ 2007-04-11 13:04 ` Jiri Slaby
0 siblings, 0 replies; 21+ messages in thread
From: Jiri Slaby @ 2007-04-11 13:04 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, corentincj, sziwan, acpi4asus-user, len.brown, linux-acpi
asus_acpi, support F2JE model
also augment the driver to support switching LCD status even if no function
for getting lcd status exists in DSDT.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit 54f13ae12fa0a3e3fc02dda6225baa3436f1e93a
tree 70c08fc62a1a2f08ac8cc8f4cf5796a1d6f34764
parent 0156510dee9d326af2ec52cf8b1a388ce9a839e9
author Jiri Slaby <jirislaby@gmail.com> Wed, 11 Apr 2007 15:03:26 +0200
committer Jiri Slaby <jirislaby@gmail.com> Wed, 11 Apr 2007 15:03:26 +0200
drivers/acpi/asus_acpi.c | 37 +++++++++++++++++++++++++++++++------
1 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index 0a9ea00..2363578 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -123,6 +123,7 @@ struct asus_hotk {
A2x, //A2500H
A4G, //A4700G
D1x, //D1
+ F2x, //F2JE
L2D, //L2000D
L3C, //L3800C
L3D, //L3400D
@@ -150,6 +151,7 @@ struct asus_hotk {
/* Here we go */
#define A1x_PREFIX "\\_SB.PCI0.ISA.EC0."
+#define F2x_PREFIX "\\_SB.PCI0.SBRG.EC0."
#define L3C_PREFIX "\\_SB.PCI0.PX40.ECD0."
#define M1A_PREFIX "\\_SB.PCI0.PX40.EC0."
#define P30_PREFIX "\\_SB.PCI0.LPCB.EC0."
@@ -206,6 +208,16 @@ static struct model_data model_conf[END_MODEL] = {
.display_get = "\\INFB"},
{
+ .name = "F2x",
+ .mt_wled = "WLED",
+ .mt_bt_switch = "BLED",
+ .mt_lcd_switch = F2x_PREFIX "_Q10",
+ .brightness_set = "SPLV",
+ .brightness_get = "GPLV",
+ .display_set = "SDSP",
+ .display_get = "\\ADVG"},
+
+ {
.name = "L2D",
.mt_mled = "MLED",
.mled_status = "\\SGP6",
@@ -706,6 +718,8 @@ static int get_lcd_state(void)
{
int lcd = 0;
+ BUG_ON(!hotk->methods->lcd_status);
+
if (hotk->model != L3H) {
/* We don't have to check anything if we are here */
if (!read_acpi_int(NULL, hotk->methods->lcd_status, &lcd))
@@ -748,11 +762,17 @@ static int get_lcd_state(void)
static int set_lcd_state(int value)
{
- int lcd = 0;
acpi_status status = 0;
- lcd = value ? 1 : 0;
- if (lcd != get_lcd_state()) {
+ if (!value && !hotk->methods->lcd_status) {
+ printk(KERN_ERR "Asus ACPI: You must pass nonzero value to "
+ "switch LCD status for this model\n");
+ return -EINVAL;
+ }
+
+ /* pay attention to lazy evaluation, we don't want to reach
+ get_lcd_state if lcd_status is empty string */
+ if (!hotk->methods->lcd_status || !!value != get_lcd_state()) {
/* switch */
if (hotk->model != L3H) {
status =
@@ -778,7 +798,10 @@ static int
proc_read_lcd(char *page, char **start, off_t off, int count, int *eof,
void *data)
{
- return sprintf(page, "%d\n", get_lcd_state());
+ return hotk->methods->lcd_status ?
+ sprintf(page, "%d\n", get_lcd_state()) :
+ sprintf(page, "n/a (but 1 may be written to switch LCD "
+ "state)\n");
}
static int
@@ -1007,7 +1030,7 @@ static int asus_hotk_add_fs(struct acpi_device *device)
* We need both read node and write method as LCD switch is also accessible
* from keyboard
*/
- if (hotk->methods->mt_lcd_switch && hotk->methods->lcd_status) {
+ if (hotk->methods->mt_lcd_switch) {
asus_proc_add(PROC_LCD, &proc_write_lcd, &proc_read_lcd, mode,
device);
}
@@ -1040,7 +1063,7 @@ static int asus_hotk_remove_fs(struct acpi_device *device)
remove_proc_entry(PROC_LEDD, acpi_device_dir(device));
if (hotk->methods->mt_bt_switch)
remove_proc_entry(PROC_BT, acpi_device_dir(device));
- if (hotk->methods->mt_lcd_switch && hotk->methods->lcd_status)
+ if (hotk->methods->mt_lcd_switch)
remove_proc_entry(PROC_LCD, acpi_device_dir(device));
if ((hotk->methods->brightness_up
&& hotk->methods->brightness_down)
@@ -1091,6 +1114,8 @@ static int asus_model_match(char *model)
return L8L;
else if (strncmp(model, "L4R", 3) == 0)
return L4R;
+ else if (strncmp(model, "F2JE", 4) == 0)
+ return F2x;
else if (strncmp(model, "M6N", 3) == 0 || strncmp(model, "W3N", 3) == 0)
return M6N;
else if (strncmp(model, "M6R", 3) == 0 || strncmp(model, "A3G", 3) == 0)
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 1/1] ACPI: asus_acpi, support F2JE model
@ 2007-04-11 13:04 ` Jiri Slaby
0 siblings, 0 replies; 21+ messages in thread
From: Jiri Slaby @ 2007-04-11 13:04 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, corentincj, sziwan, acpi4asus-user, len.brown, linux-acpi
asus_acpi, support F2JE model
also augment the driver to support switching LCD status even if no function
for getting lcd status exists in DSDT.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit 54f13ae12fa0a3e3fc02dda6225baa3436f1e93a
tree 70c08fc62a1a2f08ac8cc8f4cf5796a1d6f34764
parent 0156510dee9d326af2ec52cf8b1a388ce9a839e9
author Jiri Slaby <jirislaby@gmail.com> Wed, 11 Apr 2007 15:03:26 +0200
committer Jiri Slaby <jirislaby@gmail.com> Wed, 11 Apr 2007 15:03:26 +0200
drivers/acpi/asus_acpi.c | 37 +++++++++++++++++++++++++++++++------
1 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index 0a9ea00..2363578 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -123,6 +123,7 @@ struct asus_hotk {
A2x, //A2500H
A4G, //A4700G
D1x, //D1
+ F2x, //F2JE
L2D, //L2000D
L3C, //L3800C
L3D, //L3400D
@@ -150,6 +151,7 @@ struct asus_hotk {
/* Here we go */
#define A1x_PREFIX "\\_SB.PCI0.ISA.EC0."
+#define F2x_PREFIX "\\_SB.PCI0.SBRG.EC0."
#define L3C_PREFIX "\\_SB.PCI0.PX40.ECD0."
#define M1A_PREFIX "\\_SB.PCI0.PX40.EC0."
#define P30_PREFIX "\\_SB.PCI0.LPCB.EC0."
@@ -206,6 +208,16 @@ static struct model_data model_conf[END_MODEL] = {
.display_get = "\\INFB"},
{
+ .name = "F2x",
+ .mt_wled = "WLED",
+ .mt_bt_switch = "BLED",
+ .mt_lcd_switch = F2x_PREFIX "_Q10",
+ .brightness_set = "SPLV",
+ .brightness_get = "GPLV",
+ .display_set = "SDSP",
+ .display_get = "\\ADVG"},
+
+ {
.name = "L2D",
.mt_mled = "MLED",
.mled_status = "\\SGP6",
@@ -706,6 +718,8 @@ static int get_lcd_state(void)
{
int lcd = 0;
+ BUG_ON(!hotk->methods->lcd_status);
+
if (hotk->model != L3H) {
/* We don't have to check anything if we are here */
if (!read_acpi_int(NULL, hotk->methods->lcd_status, &lcd))
@@ -748,11 +762,17 @@ static int get_lcd_state(void)
static int set_lcd_state(int value)
{
- int lcd = 0;
acpi_status status = 0;
- lcd = value ? 1 : 0;
- if (lcd != get_lcd_state()) {
+ if (!value && !hotk->methods->lcd_status) {
+ printk(KERN_ERR "Asus ACPI: You must pass nonzero value to "
+ "switch LCD status for this model\n");
+ return -EINVAL;
+ }
+
+ /* pay attention to lazy evaluation, we don't want to reach
+ get_lcd_state if lcd_status is empty string */
+ if (!hotk->methods->lcd_status || !!value != get_lcd_state()) {
/* switch */
if (hotk->model != L3H) {
status =
@@ -778,7 +798,10 @@ static int
proc_read_lcd(char *page, char **start, off_t off, int count, int *eof,
void *data)
{
- return sprintf(page, "%d\n", get_lcd_state());
+ return hotk->methods->lcd_status ?
+ sprintf(page, "%d\n", get_lcd_state()) :
+ sprintf(page, "n/a (but 1 may be written to switch LCD "
+ "state)\n");
}
static int
@@ -1007,7 +1030,7 @@ static int asus_hotk_add_fs(struct acpi_device *device)
* We need both read node and write method as LCD switch is also accessible
* from keyboard
*/
- if (hotk->methods->mt_lcd_switch && hotk->methods->lcd_status) {
+ if (hotk->methods->mt_lcd_switch) {
asus_proc_add(PROC_LCD, &proc_write_lcd, &proc_read_lcd, mode,
device);
}
@@ -1040,7 +1063,7 @@ static int asus_hotk_remove_fs(struct acpi_device *device)
remove_proc_entry(PROC_LEDD, acpi_device_dir(device));
if (hotk->methods->mt_bt_switch)
remove_proc_entry(PROC_BT, acpi_device_dir(device));
- if (hotk->methods->mt_lcd_switch && hotk->methods->lcd_status)
+ if (hotk->methods->mt_lcd_switch)
remove_proc_entry(PROC_LCD, acpi_device_dir(device));
if ((hotk->methods->brightness_up
&& hotk->methods->brightness_down)
@@ -1091,6 +1114,8 @@ static int asus_model_match(char *model)
return L8L;
else if (strncmp(model, "L4R", 3) == 0)
return L4R;
+ else if (strncmp(model, "F2JE", 4) == 0)
+ return F2x;
else if (strncmp(model, "M6N", 3) == 0 || strncmp(model, "W3N", 3) == 0)
return M6N;
else if (strncmp(model, "M6R", 3) == 0 || strncmp(model, "A3G", 3) == 0)
^ permalink raw reply related [flat|nested] 21+ messages in thread
end of thread, other threads:[~2007-04-11 21:17 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-11 9:33 [PATCH 1/1] ACPI: asus_acpi, support F2JE model Jiri Slaby
2007-04-11 9:33 ` Jiri Slaby
2007-04-11 13:05 ` Corentin CHARY
2007-04-11 13:05 ` Corentin CHARY
2007-04-11 13:46 ` Jiri Slaby
2007-04-11 18:18 ` Danny Kukawka
2007-04-11 18:18 ` Danny Kukawka
2007-04-11 18:32 ` Danny Kukawka
2007-04-11 18:32 ` Danny Kukawka
2007-04-11 19:23 ` Jiri Slaby
2007-04-11 19:23 ` Jiri Slaby
2007-04-11 19:43 ` Danny Kukawka
2007-04-11 13:10 ` Jiri Slaby
2007-04-11 13:04 Jiri Slaby
2007-04-11 13:04 ` Jiri Slaby
2007-04-11 20:20 ` Andrew Morton
2007-04-11 20:20 ` Andrew Morton
2007-04-11 20:32 ` Jiri Slaby
2007-04-11 20:37 ` Jiri Slaby
2007-04-11 21:06 ` Andrew Morton
2007-04-11 21:17 ` Jiri Slaby
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.