Re: [Fwd: Re: A problem about acer-wmi]
Hi AceLan, 於 三,2011-08-10 於 10:13 +0800,joeyli 提到: 於 二,2011-08-09 於 14:33 +0800,AceLan Kao 提到: Dear Joey, The current project we have right now have to follow the Acer WMI to handle the key events, that means no EC key event. And we have 3 keys that are not working now, they are touchpad toggle, brightness up, and brightness down. The touchpad toggle function is a Hotkey Break Event(function number 0x2), and brightness key events are Brightness Change Event(function number 0x4). But now acer-wmi driver only handles General Hotkey Event(function number 0x1). Yes, current acer-wmi only capture the event function number 0x1, you can add those new function to acer_wmi_notify(). I just implemented those 3 key events, so I think maybe we don't have to create a new acer-wmi driver. Great! Welcome for you patches, I will also test it. I'm longing for your work to clear up the acer-wmi driver, so that I can add the new machine id and send you the patch. Thanks. BTW, I'm available to help if you are too busy to do that. Best regards, AceLan Kao. I am doing the clear up, now, will send out patch (I hope today). Thank's Joey Lee I add a new ACER_WMID_v2 interface flag and do some clear up in acer-wmi initial function and get_u32 functions. Please kindly test this patch: Thank's Joey Lee From 28b2e2ebaa230d339d5749b581c667ed074bb7ea Mon Sep 17 00:00:00 2001 From: Lee, Chun-Yi j...@suse.com Date: Wed, 10 Aug 2011 16:36:02 +0800 Subject: [PATCH] acer-wmi: add ACER_WMID_v2 interface flag to represent new notebooks There have new acer notebooks' BIOS provide new WMID_GUID3 and ACERWMID_EVENT_GUID methods. Some of machines still keep the old WMID_GUID1 method but more and more machines were already removed old wmi methods from DSDT. So, this patch add a new ACER_WMID_v2 interface flag to represent new acer notebooks, the following is definition: + ACER_WMID: It means this machine only provides WMID_GUID1/2 methods. + ACER_WMID_v2: It means this machine provide new WMID_GUID3 and WMID_EVENT_GUID methods. Some ACER_WMID_v2 machines also provide old WMID_GUID1/2 methods, but we still query/set communication device's state by new WMID_GUID3 method. Tested on Acer Travelmate 8572 Signed-off-by: Lee, Chun-Yi j...@suse.com --- drivers/platform/x86/acer-wmi.c | 409 --- 1 files changed, 211 insertions(+), 198 deletions(-) diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index af2bb20..712a505 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -190,6 +190,7 @@ enum interface_flags { ACER_AMW0, ACER_AMW0_V2, ACER_WMID, + ACER_WMID_v2, }; #define ACER_DEFAULT_WIRELESS 0 @@ -868,6 +869,176 @@ static acpi_status WMID_set_u32(u32 value, u32 cap, struct wmi_interface *iface) return WMI_execute_u32(method_id, (u32)value, NULL); } +static acpi_status wmid3_get_device_status(u32 *value, u16 device) +{ + struct wmid3_gds_return_value return_value; + acpi_status status; + union acpi_object *obj; + struct wmid3_gds_input_param params = { + .function_num = 0x1, + .hotkey_number = 0x01, + .devices = device, + }; + struct acpi_buffer input = { + sizeof(struct wmid3_gds_input_param), + params + }; + struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; + + status = wmi_evaluate_method(WMID_GUID3, 0, 0x2, input, output); + if (ACPI_FAILURE(status)) + return status; + + obj = output.pointer; + + if (!obj) + return AE_ERROR; + else if (obj-type != ACPI_TYPE_BUFFER) { + kfree(obj); + return AE_ERROR; + } + if (obj-buffer.length != 8) { + pr_warn(Unknown buffer length %d\n, obj-buffer.length); + kfree(obj); + return AE_ERROR; + } + + return_value = *((struct wmid3_gds_return_value *)obj-buffer.pointer); + kfree(obj); + + if (return_value.error_code || return_value.ec_return_value) + pr_warn(Get Device Status failed: 0x%x - 0x%x\n, + return_value.error_code, + return_value.ec_return_value); + else + *value = !!(return_value.devices device); + + return status; +} + +static acpi_status wmid_v2_get_u32(u32 *value, u32 cap) +{ + u16 device; + + switch (cap) { + case ACER_CAP_WIRELESS: + device = ACER_WMID3_GDS_WIRELESS; + break; + case ACER_CAP_BLUETOOTH: + device = ACER_WMID3_GDS_BLUETOOTH; + break; + case ACER_CAP_THREEG: + device = ACER_WMID3_GDS_THREEG; + break; + default: +
Re: [Fwd: Re: A problem about acer-wmi]
Hi AceLan, 於 三,2011-08-10 於 10:13 +0800,joeyli 提到: 於 二,2011-08-09 於 14:33 +0800,AceLan Kao 提到: Dear Joey, The current project we have right now have to follow the Acer WMI to handle the key events, that means no EC key event. And we have 3 keys that are not working now, they are touchpad toggle, brightness up, and brightness down. The touchpad toggle function is a Hotkey Break Event(function number 0x2), and brightness key events are Brightness Change Event(function number 0x4). But now acer-wmi driver only handles General Hotkey Event(function number 0x1). Yes, current acer-wmi only capture the event function number 0x1, you can add those new function to acer_wmi_notify(). I just implemented those 3 key events, so I think maybe we don't have to create a new acer-wmi driver. Great! Welcome for you patches, I will also test it. I'm longing for your work to clear up the acer-wmi driver, so that I can add the new machine id and send you the patch. Thanks. BTW, I'm available to help if you are too busy to do that. Best regards, AceLan Kao. I am doing the clear up, now, will send out patch (I hope today). Thank's Joey Lee I add a new ACER_WMID_v2 interface flag and do some clear up in acer-wmi initial function and get_u32 functions. Please kindly test this patch: Thank's Joey Lee From 28b2e2ebaa230d339d5749b581c667ed074bb7ea Mon Sep 17 00:00:00 2001 From: Lee, Chun-Yi j...@suse.com Date: Wed, 10 Aug 2011 16:36:02 +0800 Subject: [PATCH] acer-wmi: add ACER_WMID_v2 interface flag to represent new notebooks There have new acer notebooks' BIOS provide new WMID_GUID3 and ACERWMID_EVENT_GUID methods. Some of machines still keep the old WMID_GUID1 method but more and more machines were already removed old wmi methods from DSDT. So, this patch add a new ACER_WMID_v2 interface flag to represent new acer notebooks, the following is definition: + ACER_WMID: It means this machine only provides WMID_GUID1/2 methods. + ACER_WMID_v2: It means this machine provide new WMID_GUID3 and WMID_EVENT_GUID methods. Some ACER_WMID_v2 machines also provide old WMID_GUID1/2 methods, but we still query/set communication device's state by new WMID_GUID3 method. Tested on Acer Travelmate 8572 Signed-off-by: Lee, Chun-Yi j...@suse.com --- drivers/platform/x86/acer-wmi.c | 409 --- 1 files changed, 211 insertions(+), 198 deletions(-) diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index af2bb20..712a505 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -190,6 +190,7 @@ enum interface_flags { ACER_AMW0, ACER_AMW0_V2, ACER_WMID, + ACER_WMID_v2, }; #define ACER_DEFAULT_WIRELESS 0 @@ -868,6 +869,176 @@ static acpi_status WMID_set_u32(u32 value, u32 cap, struct wmi_interface *iface) return WMI_execute_u32(method_id, (u32)value, NULL); } +static acpi_status wmid3_get_device_status(u32 *value, u16 device) +{ + struct wmid3_gds_return_value return_value; + acpi_status status; + union acpi_object *obj; + struct wmid3_gds_input_param params = { + .function_num = 0x1, + .hotkey_number = 0x01, + .devices = device, + }; + struct acpi_buffer input = { + sizeof(struct wmid3_gds_input_param), + params + }; + struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; + + status = wmi_evaluate_method(WMID_GUID3, 0, 0x2, input, output); + if (ACPI_FAILURE(status)) + return status; + + obj = output.pointer; + + if (!obj) + return AE_ERROR; + else if (obj-type != ACPI_TYPE_BUFFER) { + kfree(obj); + return AE_ERROR; + } + if (obj-buffer.length != 8) { + pr_warn(Unknown buffer length %d\n, obj-buffer.length); + kfree(obj); + return AE_ERROR; + } + + return_value = *((struct wmid3_gds_return_value *)obj-buffer.pointer); + kfree(obj); + + if (return_value.error_code || return_value.ec_return_value) + pr_warn(Get Device Status failed: 0x%x - 0x%x\n, + return_value.error_code, + return_value.ec_return_value); + else + *value = !!(return_value.devices device); + + return status; +} + +static acpi_status wmid_v2_get_u32(u32 *value, u32 cap) +{ + u16 device; + + switch (cap) { + case ACER_CAP_WIRELESS: + device = ACER_WMID3_GDS_WIRELESS; + break; + case ACER_CAP_BLUETOOTH: + device = ACER_WMID3_GDS_BLUETOOTH; + break; + case ACER_CAP_THREEG: + device = ACER_WMID3_GDS_THREEG; + break; + default: +
test mail, please ignore
test mail, please ignore -- To unsubscribe from this list: send the line unsubscribe platform-driver-x86 in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Fwd: Re: A problem about acer-wmi]
Hi AceLan, 於 三,2011-08-10 於 10:13 +0800,joeyli 提到: 於 二,2011-08-09 於 14:33 +0800,AceLan Kao 提到: Dear Joey, The current project we have right now have to follow the Acer WMI to handle the key events, that means no EC key event. And we have 3 keys that are not working now, they are touchpad toggle, brightness up, and brightness down. The touchpad toggle function is a Hotkey Break Event(function number 0x2), and brightness key events are Brightness Change Event(function number 0x4). But now acer-wmi driver only handles General Hotkey Event(function number 0x1). Yes, current acer-wmi only capture the event function number 0x1, you can add those new function to acer_wmi_notify(). I just implemented those 3 key events, so I think maybe we don't have to create a new acer-wmi driver. Great! Welcome for you patches, I will also test it. I'm longing for your work to clear up the acer-wmi driver, so that I can add the new machine id and send you the patch. Thanks. BTW, I'm available to help if you are too busy to do that. Best regards, AceLan Kao. I am doing the clear up, now, will send out patch (I hope today). Thank's Joey Lee I add a new ACER_WMID_v2 interface flag and do some clear up in acer-wmi initial function and get_u32 functions. Please kindly test this patch: Thank's Joey Lee From 28b2e2ebaa230d339d5749b581c667ed074bb7ea Mon Sep 17 00:00:00 2001 From: Lee, Chun-Yi j...@suse.com Date: Wed, 10 Aug 2011 16:36:02 +0800 Subject: [PATCH] acer-wmi: add ACER_WMID_v2 interface flag to represent new notebooks There have new acer notebooks' BIOS provide new WMID_GUID3 and ACERWMID_EVENT_GUID methods. Some of machines still keep the old WMID_GUID1 method but more and more machines were already removed old wmi methods from DSDT. So, this patch add a new ACER_WMID_v2 interface flag to represent new acer notebooks, the following is definition: + ACER_WMID: It means this machine only provides WMID_GUID1/2 methods. + ACER_WMID_v2: It means this machine provide new WMID_GUID3 and WMID_EVENT_GUID methods. Some ACER_WMID_v2 machines also provide old WMID_GUID1/2 methods, but we still query/set communication device's state by new WMID_GUID3 method. Tested on Acer Travelmate 8572 Signed-off-by: Lee, Chun-Yi j...@suse.com --- drivers/platform/x86/acer-wmi.c | 409 --- 1 files changed, 211 insertions(+), 198 deletions(-) diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index af2bb20..712a505 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -190,6 +190,7 @@ enum interface_flags { ACER_AMW0, ACER_AMW0_V2, ACER_WMID, + ACER_WMID_v2, }; #define ACER_DEFAULT_WIRELESS 0 @@ -868,6 +869,176 @@ static acpi_status WMID_set_u32(u32 value, u32 cap, struct wmi_interface *iface) return WMI_execute_u32(method_id, (u32)value, NULL); } +static acpi_status wmid3_get_device_status(u32 *value, u16 device) +{ + struct wmid3_gds_return_value return_value; + acpi_status status; + union acpi_object *obj; + struct wmid3_gds_input_param params = { + .function_num = 0x1, + .hotkey_number = 0x01, + .devices = device, + }; + struct acpi_buffer input = { + sizeof(struct wmid3_gds_input_param), + params + }; + struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; + + status = wmi_evaluate_method(WMID_GUID3, 0, 0x2, input, output); + if (ACPI_FAILURE(status)) + return status; + + obj = output.pointer; + + if (!obj) + return AE_ERROR; + else if (obj-type != ACPI_TYPE_BUFFER) { + kfree(obj); + return AE_ERROR; + } + if (obj-buffer.length != 8) { + pr_warn(Unknown buffer length %d\n, obj-buffer.length); + kfree(obj); + return AE_ERROR; + } + + return_value = *((struct wmid3_gds_return_value *)obj-buffer.pointer); + kfree(obj); + + if (return_value.error_code || return_value.ec_return_value) + pr_warn(Get Device Status failed: 0x%x - 0x%x\n, + return_value.error_code, + return_value.ec_return_value); + else + *value = !!(return_value.devices device); + + return status; +} + +static acpi_status wmid_v2_get_u32(u32 *value, u32 cap) +{ + u16 device; + + switch (cap) { + case ACER_CAP_WIRELESS: + device = ACER_WMID3_GDS_WIRELESS; + break; + case ACER_CAP_BLUETOOTH: + device = ACER_WMID3_GDS_BLUETOOTH; + break; + case ACER_CAP_THREEG: + device = ACER_WMID3_GDS_THREEG; + break; + default: +
Re: [RESEND][PATCH 0/5] Support for the TS-5500 board
Hi, Le Wed, 10 Aug 2011 08:18:28 +0200, Corentin Chary corentin.ch...@gmail.com a écrit : On Wed, Aug 10, 2011 at 7:53 AM, Ike Panhc ike@canonical.com wrote: I think platform-driver-x86 may not be the best mailing list for your patches. Please try to use scripts/get_maintainer.pl and it can tell you who you shall ask for reviewing. Like Ike said, this is the mainling list for drivers/platform/x86, not arch/x86, and running get_maintainer.pl on your patchs will give you the rights people to CC. Thanks for this information, it can be useful indeed. And btw, I'm not sure we really want to put all these drivers in arch/x86/platform/ts5500/ a re-create the arm driver mess. drivers/leds/, drivers/gpio/ and drivers/mtd/ are probably a best choice. In fact, this set of patches is a rewrite of the first RFC set, where we discussed that arch/x86/platform/ could be a good place, as the TS-5500 is a specific platform with its platform devices (the corresponding thread is here: https://lkml.org/lkml/2011/5/3/60). Regards, Vivien. -- To unsubscribe from this list: send the line unsubscribe platform-driver-x86 in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND][PATCH 0/5] Support for the TS-5500 board
On Wed, 2011-08-10 at 10:06 -0400, Vivien Didelot wrote: And btw, I'm not sure we really want to put all these drivers in arch/x86/platform/ts5500/ a re-create the arm driver mess. drivers/leds/, drivers/gpio/ and drivers/mtd/ are probably a best choice. In fact, this set of patches is a rewrite of the first RFC set, where we discussed that arch/x86/platform/ could be a good place, as the TS-5500 is a specific platform with its platform devices (the corresponding thread is here: https://lkml.org/lkml/2011/5/3/60). Just expose these devices in the device-tree. You shouldn't *need* a new MTD device driver; physmap_of should be just fine. If your bootloader doesn't pass one, your platform-specific code should just register its own device-tree blob during early boot. And your device drivers should just match against the devices therein. -- dwmw2 -- To unsubscribe from this list: send the line unsubscribe platform-driver-x86 in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND][PATCH 0/5] Support for the TS-5500 board
On Wed, 10 Aug 2011 15:20:46 +0100, David Woodhouse dw...@infradead.org wrote: Just expose these devices in the device-tree. You shouldn't *need* a new MTD device driver; physmap_of should be just fine. I didn't write a new MTD device driver, but just moved the already existing one to the ts5500 platform directory. The point is that my TS-5500 doesn't have this flash, so I couldn't try. The fifth patch from this set could just be ignored. If your bootloader doesn't pass one, your platform-specific code should just register its own device-tree blob during early boot. And your device drivers should just match against the devices therein. I'm a bit confused with what should be done for the support for an embedded platform (X86-based) like this TS-5500. Is the actual code hierarchy OK? What is the impact of adding a device-tree to this code? Thanks, Vivien. -- To unsubscribe from this list: send the line unsubscribe platform-driver-x86 in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Fwd: Re: A problem about acer-wmi]
Dear Joey, This is the dmesg log. [ 9010.944053] acer_wmi: Acer Laptop ACPI-WMI Extras [ 9010.944071] acer_wmi: Function bitmap for Communication Button: 0x1 [ 9010.944075] acer_wmi: Brightness must be controlled by generic video driver [ 9010.944996] input: Acer WMI hotkeys as /devices/virtual/input/input21 [ 9010.947095] acer_wmi: Set Device Status failed: 0xe2 - 0x0 And after adding my quirk, the set device status still failed, but except that, everything works well. The failed comes from acer_rfkill_init(), it'll call acer_rfkill_register() with ACER_CAP_WIRELESS parameter without checking the capability. I don't know why only wifi doesn't check the capability and call acer_rfkill_register() directly, but it doesn't hurt the system. === static int acer_rfkill_init(struct device *dev) { wireless_rfkill = acer_rfkill_register(dev, RFKILL_TYPE_WLAN, acer-wireless, ACER_CAP_WIRELESS); if (IS_ERR(wireless_rfkill)) return PTR_ERR(wireless_rfkill); === Best regards, AceLan Kao. 2011/8/10 Joey Lee j...@novell.com: Hi AceLan, 於 三,2011-08-10 於 10:13 +0800,joeyli 提到: 於 二,2011-08-09 於 14:33 +0800,AceLan Kao 提到: Dear Joey, The current project we have right now have to follow the Acer WMI to handle the key events, that means no EC key event. And we have 3 keys that are not working now, they are touchpad toggle, brightness up, and brightness down. The touchpad toggle function is a Hotkey Break Event(function number 0x2), and brightness key events are Brightness Change Event(function number 0x4). But now acer-wmi driver only handles General Hotkey Event(function number 0x1). Yes, current acer-wmi only capture the event function number 0x1, you can add those new function to acer_wmi_notify(). I just implemented those 3 key events, so I think maybe we don't have to create a new acer-wmi driver. Great! Welcome for you patches, I will also test it. I'm longing for your work to clear up the acer-wmi driver, so that I can add the new machine id and send you the patch. Thanks. BTW, I'm available to help if you are too busy to do that. Best regards, AceLan Kao. I am doing the clear up, now, will send out patch (I hope today). Thank's Joey Lee I add a new ACER_WMID_v2 interface flag and do some clear up in acer-wmi initial function and get_u32 functions. Please kindly test this patch: Thank's Joey Lee From 28b2e2ebaa230d339d5749b581c667ed074bb7ea Mon Sep 17 00:00:00 2001 From: Lee, Chun-Yi j...@suse.com Date: Wed, 10 Aug 2011 16:36:02 +0800 Subject: [PATCH] acer-wmi: add ACER_WMID_v2 interface flag to represent new notebooks There have new acer notebooks' BIOS provide new WMID_GUID3 and ACERWMID_EVENT_GUID methods. Some of machines still keep the old WMID_GUID1 method but more and more machines were already removed old wmi methods from DSDT. So, this patch add a new ACER_WMID_v2 interface flag to represent new acer notebooks, the following is definition: + ACER_WMID: It means this machine only provides WMID_GUID1/2 methods. + ACER_WMID_v2: It means this machine provide new WMID_GUID3 and WMID_EVENT_GUID methods. Some ACER_WMID_v2 machines also provide old WMID_GUID1/2 methods, but we still query/set communication device's state by new WMID_GUID3 method. Tested on Acer Travelmate 8572 Signed-off-by: Lee, Chun-Yi j...@suse.com --- drivers/platform/x86/acer-wmi.c | 409 --- 1 files changed, 211 insertions(+), 198 deletions(-) diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index af2bb20..712a505 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -190,6 +190,7 @@ enum interface_flags { ACER_AMW0, ACER_AMW0_V2, ACER_WMID, + ACER_WMID_v2, }; #define ACER_DEFAULT_WIRELESS 0 @@ -868,6 +869,176 @@ static acpi_status WMID_set_u32(u32 value, u32 cap, struct wmi_interface *iface) return WMI_execute_u32(method_id, (u32)value, NULL); } +static acpi_status wmid3_get_device_status(u32 *value, u16 device) +{ + struct wmid3_gds_return_value return_value; + acpi_status status; + union acpi_object *obj; + struct wmid3_gds_input_param params = { + .function_num = 0x1, + .hotkey_number = 0x01, + .devices = device, + }; + struct acpi_buffer input = { + sizeof(struct wmid3_gds_input_param), + params + }; + struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; + + status = wmi_evaluate_method(WMID_GUID3, 0, 0x2, input, output); + if (ACPI_FAILURE(status)) + return status; + + obj = output.pointer; + + if (!obj) + return AE_ERROR; + else if (obj-type != ACPI_TYPE_BUFFER) { +
Re: [Fwd: Re: A problem about acer-wmi]
於 四,2011-08-11 於 10:48 +0800,AceLan Kao 提到: Dear Joey, This is the dmesg log. [ 9010.944053] acer_wmi: Acer Laptop ACPI-WMI Extras [ 9010.944071] acer_wmi: Function bitmap for Communication Button: 0x1 [ 9010.944075] acer_wmi: Brightness must be controlled by generic video driver [ 9010.944996] input: Acer WMI hotkeys as /devices/virtual/input/input21 [ 9010.947095] acer_wmi: Set Device Status failed: 0xe2 - 0x0 And after adding my quirk, the set device status still failed, but except that, everything works well. So, you machine have wifi hardware module or not? The failed comes from acer_rfkill_init(), it'll call acer_rfkill_register() with ACER_CAP_WIRELESS parameter without checking the capability. I don't know why only wifi doesn't check the capability and call acer_rfkill_register() directly, but it doesn't hurt the system. === static int acer_rfkill_init(struct device *dev) { wireless_rfkill = acer_rfkill_register(dev, RFKILL_TYPE_WLAN, acer-wireless, ACER_CAP_WIRELESS); if (IS_ERR(wireless_rfkill)) return PTR_ERR(wireless_rfkill); === Best regards, AceLan Kao. I checked the history, looks like it's just a original design in old patch. Yes, you are right, add ACER_CAP_WIRELESS check is better. I am doing generate a patch to add ACER_CAP_WIRELESS check. Will attached patch on mail. Thank's Joey Lee 2011/8/10 Joey Lee j...@novell.com: Hi AceLan, 於 三,2011-08-10 於 10:13 +0800,joeyli 提到: 於 二,2011-08-09 於 14:33 +0800,AceLan Kao 提到: Dear Joey, The current project we have right now have to follow the Acer WMI to handle the key events, that means no EC key event. And we have 3 keys that are not working now, they are touchpad toggle, brightness up, and brightness down. The touchpad toggle function is a Hotkey Break Event(function number 0x2), and brightness key events are Brightness Change Event(function number 0x4). But now acer-wmi driver only handles General Hotkey Event(function number 0x1). Yes, current acer-wmi only capture the event function number 0x1, you can add those new function to acer_wmi_notify(). I just implemented those 3 key events, so I think maybe we don't have to create a new acer-wmi driver. Great! Welcome for you patches, I will also test it. I'm longing for your work to clear up the acer-wmi driver, so that I can add the new machine id and send you the patch. Thanks. BTW, I'm available to help if you are too busy to do that. Best regards, AceLan Kao. I am doing the clear up, now, will send out patch (I hope today). Thank's Joey Lee I add a new ACER_WMID_v2 interface flag and do some clear up in acer-wmi initial function and get_u32 functions. Please kindly test this patch: Thank's Joey Lee From 28b2e2ebaa230d339d5749b581c667ed074bb7ea Mon Sep 17 00:00:00 2001 From: Lee, Chun-Yi j...@suse.com Date: Wed, 10 Aug 2011 16:36:02 +0800 Subject: [PATCH] acer-wmi: add ACER_WMID_v2 interface flag to represent new notebooks There have new acer notebooks' BIOS provide new WMID_GUID3 and ACERWMID_EVENT_GUID methods. Some of machines still keep the old WMID_GUID1 method but more and more machines were already removed old wmi methods from DSDT. So, this patch add a new ACER_WMID_v2 interface flag to represent new acer notebooks, the following is definition: + ACER_WMID: It means this machine only provides WMID_GUID1/2 methods. + ACER_WMID_v2: It means this machine provide new WMID_GUID3 and WMID_EVENT_GUID methods. Some ACER_ but we still query/set communication device's state by new WMID_GUID3 method. Tested on Acer Travelmate 8572 Signed-off-by: Lee, Chun-Yi j...@suse.com --- drivers/platform/x86/acer-wmi.c | 409 --- 1 files changed, 211 insertions(+), 198 deletions(-) diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index af2bb20..712a505 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -190,6 +190,7 @@ enum interface_flags { ACER_AMW0, ACER_AMW0_V2, ACER_WMID, + ACER_WMID_v2, }; #define ACER_DEFAULT_WIRELESS 0 @@ -868,6 +869,176 @@ static acpi_status WMID_set_u32(u32 value, u32 cap, struct wmi_interface *iface) return WMI_execute_u32(method_id, (u32)value, NULL); } +static acpi_status wmid3_get_device_status(u32 *value, u16 device) +{ + struct wmid3_gds_return_value return_value; + acpi_status status; + union acpi_object *obj; + struct wmid3_gds_input_param params = { + .function_num = 0x1, + .hotkey_number = 0x01, + .devices = device, + }; + struct acpi_buffer input = { +
Re: [PATCH 21/34] drivers/platform changes for SMBIOS and System Firmware
On Mon, Jul 18, 2011 at 09:08:35AM -0400, Prarit Bhargava wrote: - Replace old dmi* structures and functions with new sysfw* and smbios* structures and functions in individual drivers - cleanup sysfw_id lookup tables - add exactmatch functionality - edit udev notifiers - cleanup of includes for dmi.h and mod_devicetable.h which were included in some files that did not need them [v2]: Re-exported dmi MODULE_ALIAS : drivers/platform/x86/fujitsu-laptop.c | 41 : In-so-far as I can tell with a quick inspection, this looks ok for the fujitsu-laptop.c module. Acked-by: Jonathan Woithe jwoi...@physics.adelaide.edu.au At the risk of looking ill-informed, I assume the DMI infrastructure has been deprecated by the more general sysfw. Regards jonathan -- To unsubscribe from this list: send the line unsubscribe platform-driver-x86 in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html