sony-laptop fixes for 2.6.30
Subsystems (3)
Mattia Dongili
maintainercover sony-laptop fixes for 2.6.30
Hi Len,
a few fixes on top of my previous submission (diffed against your test branch). There are fixes for spelling mistakes, a build fix and the new style events reporting issue spotted by Matthias[1]. The only remaining problem is the rfkill not enabling the devices if inserting the module with the switch on and turning if off afterwards but I's day this is a good start to add support for a number of vaio models.
drivers/platform/x86/Kconfig | 1 + drivers/platform/x86/sony-laptop.c | 53 +++++++++++++++++++---------------- 2 files changed, 30 insertions(+), 24 deletions(-)
[1]: I splitted Matthias patch in two and modified some bits for the event reporting, I hope the attribution is ok.
Signature · 1 line
mattia
Mattia Dongili
maintainerPATCH 1/4 sony-laptop: Fix some typos in log messages (Unabe/Unable)
From: Alessio Igor Bogani <[email protected]>
--- drivers/platform/x86/sony-laptop.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/platform/x86/sony-laptop.c +4 -4
@@ -397,7 +397,7 @@ static int sony_laptop_setup_input(struct acpi_device *acpi_device) sony_laptop_input.wq =create_singlethread_workqueue ("sony-laptop" );if (!sony_laptop_input.wq) { printk(KERN_ERR DRV_PFX - "Unabe to create workqueue.\n"); + "Unable to create workqueue.\n"); error = -ENXIO ; goto err_free_kfifo; }
@@ -1267,7 +1267,7 @@ static int sony_nc_add(struct acpi_device *device) result =sony_laptop_setup_input (device);if (result) { printk(KERN_ERR DRV_PFX - "Unabe to create input devices.\n"); + "Unable to create input devices.\n"); goto outwalk; }
@@ -2816,7 +2816,7 @@ static int sony_pic_add(struct acpi_device *device) result =sony_pic_possible_resources (device);if (result) { printk(KERN_ERR DRV_PFX - "Unabe to read possible resources.\n"); + "Unable to read possible resources.\n"); goto err_free_resources; }
@@ -2824,7 +2824,7 @@ static int sony_pic_add(struct acpi_device *device) result =sony_laptop_setup_input (device);if (result) { printk(KERN_ERR DRV_PFX - "Unabe to create input devices.\n"); + "Unable to create input devices.\n"); goto err_free_resources; }
Signature · 1 line
1.6.2.1
Mattia Dongili
maintainerPATCH 2/4 sony-laptop: new style events typo fixes
From: Matthias Welwarsky <[email protected]>
--- drivers/platform/x86/sony-laptop.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/sony-laptop.c +2 -2
@@ -865,7 +865,7 @@ struct sony_nc_event {static struct sony_nc_event sony_100_events[] = { {0x90 ,SONYPI_EVENT_PKEY_P1 }, {0x10 ,SONYPI_EVENT_ANYBUTTON_RELEASED }, - {0x91 ,SONYPI_EVENT_PKEY_P1 }, + {0x91 ,SONYPI_EVENT_PKEY_P2 }, {0x11 ,SONYPI_EVENT_ANYBUTTON_RELEASED }, {0x81 ,SONYPI_EVENT_FNKEY_F1 }, {0x01 ,SONYPI_EVENT_FNKEY_RELEASED },
@@ -929,7 +929,7 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)if (sony_find_snc_handle (0x127 ) == ev) key_handle =0x127 ; -if (handle) { +if (key_handle) {struct sony_nc_event *key_event;if (sony_call_snc_handle (key_handle,0x200 , &result))
Signature · 1 line
1.6.2.1
Mattia Dongili
maintainerPATCH 3/4 sony-laptop should depend on RFKILL
From: Alexander Beregalov <[email protected]>
Fixes this build error when RFKILL is not set:
drivers/platform/x86/sony-laptop.c:1050: undefined reference to `rfkill_unregister' and so on..
--- drivers/platform/x86/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/platform/x86/Kconfig +1 -0
@@ -165,6 +165,7 @@ config SONY_LAPTOP depends on ACPI select BACKLIGHT_CLASS_DEVICE depends on INPUT + depends on RFKILL ---help--- This mini-driver drives the SNC and SPIC devices present in the ACPI BIOS of the Sony Vaio laptops.
Signature · 1 line
1.6.2.1
Mattia Dongili
maintainerPATCH 4/4 sony-laptop: fix event reporting for new style events
From: Matthias Welwarsky <[email protected]>
In short Fn key events are always reported through acpi. The input layer gets all the old style events and only those new style events that, after being decoded, are mapped to an locally represented events.
rfkill only update the rfkill device status.
--- drivers/platform/x86/sony-laptop.c | 41 ++++++++++++++++++++--------------- 1 files changed, 23 insertions(+), 18 deletions(-)
drivers/platform/x86/sony-laptop.c +23 -18
@@ -917,10 +917,10 @@ static struct sony_nc_event sony_127_events[] = {static void sony_acpi_notify (acpi_handle handle,u32 event,void *data) {u32 ev = event; -int result;if (ev >=0x90 ) {/* New-style event */ +int result;int key_handle =0 ; ev -=0x90 ;
@@ -932,38 +932,43 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)if (key_handle) {struct sony_nc_event *key_event; -if (sony_call_snc_handle (key_handle,0x200 , &result)) +if (sony_call_snc_handle (key_handle,0x200 , &result)) {dprintk ("sony_acpi_notify, unable to decode" " event 0x%.2x 0x%.2x\n" , key_handle, ev); -else +/* restore the original event */ + ev = event; + }else { ev = result &0xFF ; -if (key_handle ==0x100 ) - key_event = sony_100_events; -else - key_event = sony_127_events; +if (key_handle ==0x100 ) + key_event = sony_100_events; +else + key_event = sony_127_events; -for (; key_event->data; key_event++) { -if (key_event->data == ev) { - ev = key_event->event; -break ; +for (; key_event->data; key_event++) { +if (key_event->data == ev) { + ev = key_event->event; +break ; + } } - } -if (!key_event->data) { - printk(KERN_INFO DRV_PFX -"Unknown event: 0x%x 0x%x\n" , key_handle, - ev); +if (!key_event->data) + printk(KERN_INFO DRV_PFX +"Unknown event: 0x%x 0x%x\n" , + key_handle, + ev); +else +sony_laptop_report_input_event (ev); } }else if (sony_find_snc_handle (0x124 ) == ev) {sony_nc_rfkill_update ();return ; } - } + }else +sony_laptop_report_input_event (ev);dprintk ("sony_acpi_notify, event: 0x%.2x\n" , ev); -sony_laptop_report_input_event (ev);acpi_bus_generate_proc_event (sony_nc_acpi_device,1 , ev); }
Signature · 1 line
1.6.2.1
Len Brown
reviewer1-4 applied
Though, Mattia, you will not get this message, as every message I send you from this account recently is bounced with:
Original-recipient: rfc822;[email protected]
Final-recipient: rfc822;[email protected]
Action: failed
Status: 5.7.1 (Remote SMTP server has rejected address)
Remote-MTA: dns;picard.linux.it (TCP|206.46.173.7|30552|213.254.12.146|25)
(picard.linux.it ESMTP Postfix [Debian/GNU])
Diagnostic-code: smtp;554 5.7.1 Service unavailable; Client host [206.46.173.7]
blocked using ip.mybl.bofh.it; see http://bl.bofh.it/bl?ip=206.46.173.
--
Len Brown, Intel Open Source Technology Center