sony-laptop for 2.6.30
Subsystems (3)
Mattia Dongili
maintainercover sony-laptop for 2.6.30
Hello Len,
This is a list of long overdue patches I had sitting in my local tree. Please could you include them in you batch for 2.6.30?
PS: apologies to those who receive these emails twice (due to me trying git-send-email ;))
Thanks
--- drivers/platform/x86/sony-laptop.c | 126 +++++++++++++++++++++++++----------- include/linux/sonypi.h | 3 + 2 files changed, 91 insertions(+), 38 deletions(-)
Signature · 1 line
mattia
Mattia Dongili
maintainerPATCH 1/9 merge Type4 into Type3
Creating Type4 was a mistake in the first place. Some users report that also Type3 vaios require the same extra hotkey handling which the Type4 for was menat to guard from.
Merging down Type4 into Type3 will just remove a useless distinction.
--- drivers/platform/x86/sony-laptop.c | 28 ++++++---------------------- 1 files changed, 6 insertions(+), 22 deletions(-)
drivers/platform/x86/sony-laptop.c +6 -22
@@ -1195,7 +1195,6 @@ static struct acpi_driver sony_nc_driver = {#define SONYPI_TYPE1_OFFSET 0x04#define SONYPI_TYPE2_OFFSET 0x12#define SONYPI_TYPE3_OFFSET 0x12 -#define SONYPI_TYPE4_OFFSET 0x12struct sony_pic_ioport {struct acpi_resource_io io1;
@@ -1438,14 +1437,6 @@ static struct sonypi_eventtypes type3_events[] = { { 0x31, SONYPI_MEMORYSTICK_MASK, sonypi_memorystickev }, { 0x41, SONYPI_BATTERY_MASK, sonypi_batteryev }, { 0x31, SONYPI_PKEY_MASK, sonypi_pkeyev }, - { 0 }, -}; -static struct sonypi_eventtypes type4_events[] = { - {0 ,0xffffffff , sonypi_releaseev }, - {0x21 ,SONYPI_FNKEY_MASK , sonypi_fnkeyev }, - {0x31 ,SONYPI_WIRELESS_MASK , sonypi_wlessev }, - {0x31 ,SONYPI_MEMORYSTICK_MASK , sonypi_memorystickev }, - {0x41 ,SONYPI_BATTERY_MASK , sonypi_batteryev }, { 0x05, SONYPI_PKEY_MASK, sonypi_pkeyev }, { 0x05, SONYPI_ZOOM_MASK, sonypi_zoomev }, { 0x05, SONYPI_CAPTURE_MASK, sonypi_captureev },
@@ -1511,11 +1502,11 @@ static u8 sony_pic_call3(u8 dev, u8 fn, u8 v)/* * minidrivers for SPIC models */ -static int type4_handle_irq (const u8 data_mask,const u8 ev) +static int type3_handle_irq (const u8 data_mask,const u8 ev) {/* * 0x31 could mean we have to take some extra action and wait for -* the next irq for some Type4 models, it will generate a new +* the next irq for some Type3 models, it will generate a new * irq and we can read new data from the device: * - 0x5c and 0x5f requires 0xA0 * - 0x61 requires 0xB3
@@ -1545,16 +1536,10 @@ static struct device_ctrl spic_types[] = { }, { .model = SONYPI_DEVICE_TYPE3, - .handle_irq = NULL, + .handle_irq = type3_handle_irq, .evport_offset = SONYPI_TYPE3_OFFSET, .event_types = type3_events, }, - { - .model = SONYPI_DEVICE_TYPE4, - .handle_irq = type4_handle_irq, - .evport_offset = SONYPI_TYPE4_OFFSET, - .event_types = type4_events, - }, };static void sony_pic_detect_device_type (struct sony_pic_dev *dev)
@@ -1578,14 +1563,14 @@ static void sony_pic_detect_device_type(struct sony_pic_dev *dev) pcidev =pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ICH7_1 ,NULL );if (pcidev) { - dev->control = &spic_types[3 ]; + dev->control = &spic_types[2 ]; goto out; } pcidev =pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ICH8_4 ,NULL );if (pcidev) { - dev->control = &spic_types[3 ]; + dev->control = &spic_types[2 ]; goto out; }
@@ -1598,8 +1583,7 @@ out: printk(KERN_INFO DRV_PFX "detected Type%d model\n", dev->control->model ==SONYPI_DEVICE_TYPE1 ?1 : - dev->control->model ==SONYPI_DEVICE_TYPE2 ?2 : - dev->control->model == SONYPI_DEVICE_TYPE3 ? 3 : 4); + dev->control->model == SONYPI_DEVICE_TYPE2 ? 2 : 3); }/* camera tests and poweron/poweroff */
Signature · 1 line
1.6.1.3
Mattia Dongili
maintainerPATCH 2/9 VGN-A317M hotkey support
In reply to Mattia DongiliFrom: Harald Jenny <[email protected]>
This laptop has 5 SPIC managed buttons above the keyboard:
sound + and - as well as brightness, zoom and S1. Possibly the entire VGN-A serie behaves the same.
--- drivers/platform/x86/sony-laptop.c | 24 +++++++++++++++++++++++- include/linux/sonypi.h | 3 +++ 2 files changed, 26 insertions(+), 1 deletions(-)
drivers/platform/x86/sony-laptop.c +23 -1
@@ -211,6 +211,9 @@ static int sony_laptop_input_index[] = {48 ,/* 61 SONYPI_EVENT_WIRELESS_OFF */ 49 ,/* 62 SONYPI_EVENT_ZOOM_IN_PRESSED */ 50 ,/* 63 SONYPI_EVENT_ZOOM_OUT_PRESSED */ +51 ,/* 64 SONYPI_EVENT_VOLUME_INC_PRESSED */ +52 ,/* 65 SONYPI_EVENT_VOLUME_DEC_PRESSED */ + -1, /* 66 SONYPI_EVENT_BRIGHTNESS_PRESSED */ }; static int sony_laptop_input_keycode_map[] = {
@@ -264,7 +267,9 @@ static int sony_laptop_input_keycode_map[] = {KEY_WLAN ,/* 47 SONYPI_EVENT_WIRELESS_ON */ KEY_WLAN ,/* 48 SONYPI_EVENT_WIRELESS_OFF */ KEY_ZOOMIN ,/* 49 SONYPI_EVENT_ZOOM_IN_PRESSED */ - KEY_ZOOMOUT /* 50 SONYPI_EVENT_ZOOM_OUT_PRESSED */ +KEY_ZOOMOUT ,/* 50 SONYPI_EVENT_ZOOM_OUT_PRESSED */ +KEY_VOLUMEUP ,/* 51 SONYPI_EVENT_VOLUME_INC_PRESSED */ + KEY_VOLUMEDOWN, /* 52 SONYPI_EVENT_VOLUME_DEC_PRESSED */ };/* release buttons after a short delay if pressed */
@@ -1327,6 +1332,7 @@ static struct sonypi_event sonypi_pkeyev[] = { { 0x01, SONYPI_EVENT_PKEY_P1 }, { 0x02, SONYPI_EVENT_PKEY_P2 }, { 0x04, SONYPI_EVENT_PKEY_P3 }, + { 0x20, SONYPI_EVENT_PKEY_P1 }, { 0, 0 } };
@@ -1370,6 +1376,7 @@ static struct sonypi_event sonypi_zoomev[] = { { 0x39, SONYPI_EVENT_ZOOM_PRESSED }, { 0x10, SONYPI_EVENT_ZOOM_IN_PRESSED }, { 0x20, SONYPI_EVENT_ZOOM_OUT_PRESSED }, + { 0x04, SONYPI_EVENT_ZOOM_PRESSED }, { 0, 0 } };
@@ -1400,6 +1407,19 @@ static struct sonypi_event sonypi_batteryev[] = { { 0, 0 } }; +/* The set of possible volume events */ +static struct sonypi_event sonypi_volumeev[] = { + {0x01 ,SONYPI_EVENT_VOLUME_INC_PRESSED }, + {0x02 ,SONYPI_EVENT_VOLUME_DEC_PRESSED }, + {0 ,0 } +}; + +/* The set of possible brightness events */ +static struct sonypi_event sonypi_brightnessev[] = { + {0x80 ,SONYPI_EVENT_BRIGHTNESS_PRESSED }, + {0 ,0 } +}; +static struct sonypi_eventtypes type1_events[] = { {0 ,0xffffffff , sonypi_releaseev }, {0x70 ,SONYPI_MEYE_MASK , sonypi_meyeev },
@@ -1440,6 +1460,8 @@ static struct sonypi_eventtypes type3_events[] = { { 0x05, SONYPI_PKEY_MASK, sonypi_pkeyev }, { 0x05, SONYPI_ZOOM_MASK, sonypi_zoomev }, { 0x05, SONYPI_CAPTURE_MASK, sonypi_captureev }, + { 0x05, SONYPI_PKEY_MASK, sonypi_volumeev }, + { 0x05, SONYPI_PKEY_MASK, sonypi_brightnessev }, { 0 }, };
include/linux/sonypi.h +3 -0
@@ -103,6 +103,9 @@#define SONYPI_EVENT_WIRELESS_OFF 61#define SONYPI_EVENT_ZOOM_IN_PRESSED 62#define SONYPI_EVENT_ZOOM_OUT_PRESSED 63 +#define SONYPI_EVENT_VOLUME_INC_PRESSED 64 +#define SONYPI_EVENT_VOLUME_DEC_PRESSED 65 +#define SONYPI_EVENT_BRIGHTNESS_PRESSED 66/* get/set brightness */ #define SONYPI_IOCGBRT _IOR('v', 0, __u8)
Signature · 1 line
1.6.1.3
Mattia Dongili
maintainerPATCH 3/9 Eliminate BKL in ioctls
In reply to Mattia DongiliFrom: Alan Cox <[email protected]>
--- drivers/platform/x86/sony-laptop.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/platform/x86/sony-laptop.c +3 -3
@@ -1996,8 +1996,8 @@ static int ec_read16(u8 addr, u16 *value)return 0 ; } -static int sonypi_misc_ioctl (struct inode *ip,struct file *fp, -unsigned int cmd,unsigned long arg) +static long sonypi_misc_ioctl (struct file *fp,unsigned int cmd, +unsigned long arg) {int ret =0 ;void __user *argp = (void __user *)arg;
@@ -2131,7 +2131,7 @@ static const struct file_operations sonypi_misc_fops = { .open = sonypi_misc_open, .release = sonypi_misc_release, .fasync = sonypi_misc_fasync, - .ioctl = sonypi_misc_ioctl, + .unlocked_ioctl = sonypi_misc_ioctl, };static struct miscdevice sonypi_misc_device = {
Signature · 1 line
1.6.1.3
Mattia Dongili
maintainerPATCH 4/9 detect the ICH9 chipset as Type3
In reply to Mattia DongiliFrom: ISHIKAWA Mutsumi <[email protected]>
--- drivers/platform/x86/sony-laptop.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
drivers/platform/x86/sony-laptop.c +7 -0
@@ -1596,6 +1596,13 @@ static void sony_pic_detect_device_type(struct sony_pic_dev *dev) goto out; } + pcidev =pci_get_device (PCI_VENDOR_ID_INTEL , +PCI_DEVICE_ID_INTEL_ICH9_1 ,NULL ); +if (pcidev) { + dev->control = &spic_types[2 ]; + goto out; + } +/* default */ dev->control = &spic_types[1 ];
Signature · 1 line
1.6.1.3
Mattia Dongili
maintainerPATCH 5/9 call the extra enable function for SNC on Vaio Z
In reply to Mattia DongiliFrom: ISHIKAWA Mutsumi <[email protected]>
--- drivers/platform/x86/sony-laptop.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
drivers/platform/x86/sony-laptop.c +9 -0
@@ -894,6 +894,15 @@ static const struct dmi_system_id sony_nc_ids[] = { DMI_MATCH(DMI_PRODUCT_NAME, "VGN-N"), }, }, + { + .ident = "Sony Vaio Z Series", + .callback = sony_nc_C_enable, + .driver_data = sony_C_events, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z"), + }, + }, { } };
Signature · 1 line
1.6.1.3
Mattia Dongili
maintainerPATCH 6/9 notify the hardware of a state change in wwanpower
In reply to Mattia DongiliFrom: Sergey Yanovich <[email protected]>
From: Sergey Yanovich <[email protected]>
--- drivers/platform/x86/sony-laptop.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/platform/x86/sony-laptop.c +1 -0
@@ -1785,6 +1785,7 @@ static void sony_pic_set_wwanpower(u8 state)return ; }sony_pic_call2 (0xB0 , state); +sony_pic_call1 (0x82 ); spic_dev.wwan_power = state;mutex_unlock (&spic_dev.lock); }
Signature · 1 line
1.6.1.3
Mattia Dongili
maintainerPATCH 7/9 Add FW specific hotkey events and DMI
In reply to Mattia DongiliFrom: Anton Veretenenko <[email protected]>
From: Anton Veretenenko <[email protected]>
--- drivers/platform/x86/sony-laptop.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)
drivers/platform/x86/sony-laptop.c +18 -0
@@ -843,16 +843,25 @@ static int sony_nc_C_enable(const struct dmi_system_id *id)static struct sony_nc_event sony_C_events[] = { {0x81 ,SONYPI_EVENT_FNKEY_F1 }, {0x01 ,SONYPI_EVENT_FNKEY_RELEASED }, + {0x82 ,SONYPI_EVENT_FNKEY_F2 }, + {0x02 ,SONYPI_EVENT_FNKEY_RELEASED }, {0x85 ,SONYPI_EVENT_FNKEY_F5 }, {0x05 ,SONYPI_EVENT_FNKEY_RELEASED }, + {0x85 ,SONYPI_EVENT_FNKEY_F5 }, {0x86 ,SONYPI_EVENT_FNKEY_F6 }, {0x06 ,SONYPI_EVENT_FNKEY_RELEASED }, {0x87 ,SONYPI_EVENT_FNKEY_F7 }, {0x07 ,SONYPI_EVENT_FNKEY_RELEASED }, + {0x89 ,SONYPI_EVENT_FNKEY_F9 }, + {0x09 ,SONYPI_EVENT_FNKEY_RELEASED }, {0x8A ,SONYPI_EVENT_FNKEY_F10 }, {0x0A ,SONYPI_EVENT_FNKEY_RELEASED }, {0x8C ,SONYPI_EVENT_FNKEY_F12 }, {0x0C ,SONYPI_EVENT_FNKEY_RELEASED }, + {0x90 ,SONYPI_EVENT_PKEY_P1 }, + {0x10 ,SONYPI_EVENT_FNKEY_RELEASED }, + {0xA1 ,SONYPI_EVENT_PKEY_P2 }, + {0x21 ,SONYPI_EVENT_FNKEY_RELEASED }, {0 ,0 }, };
@@ -868,6 +877,15 @@ static const struct dmi_system_id sony_nc_ids[] = { }, }, { + .ident = "Sony Vaio FW Series", + .callback = sony_nc_C_enable, + .driver_data = sony_C_events, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Sony Corporation" ), + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FW"), + }, + }, + { .ident ="Sony Vaio FZ Series" , .callback = sony_nc_C_enable, .driver_data = sony_C_events,
Signature · 1 line
1.6.1.3
Mattia Dongili
maintainerRe: [PATCH 7/9] [sony-laptop] Add FW specific hotkey events and DMI
Quoted 13 lines · Mattia Dongili
From: Anton Veretenenko <[email protected]>
From: Anton Veretenenko <[email protected]>
Signed-off-by Mattia Dongili <[email protected]>--- drivers/platform/x86/sony-laptop.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)drivers/platform/x86/sony-laptop.c +0
-0
drivers/platform/x86/sony-laptop.c static int sony_nc_C_enable(const struct dmi_system_id *id) · line 850
Quoted 8 lines
drivers/platform/x86/sony-laptop.c +3
-0@@ -843,16 +843,25 @@ static int sony_nc_C_enable(const struct dmi_system_id *id)static struct sony_nc_event sony_C_events[] = { {0x81 ,SONYPI_EVENT_FNKEY_F1 }, {0x01 ,SONYPI_EVENT_FNKEY_RELEASED }, + {0x82 ,SONYPI_EVENT_FNKEY_F2 }, + {0x02 ,SONYPI_EVENT_FNKEY_RELEASED }, {0x85 ,SONYPI_EVENT_FNKEY_F5 }, {0x05 ,SONYPI_EVENT_FNKEY_RELEASED }, + {0x85 ,SONYPI_EVENT_FNKEY_F5 },
Gah, duplicate Fn+F5. I'll resend the whole serie with this fix and some more additions
Thanks
Signature · 2 lines
mattia :wq!
Mattia Dongili
maintainerPATCH 8/9 Rename the SNC callback and events
In reply to Mattia DongiliThis two objects are not specific to the C series.
--- drivers/platform/x86/sony-laptop.c | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-)
drivers/platform/x86/sony-laptop.c +16 -16
@@ -816,10 +816,10 @@ struct sony_nc_event {static struct sony_nc_event *sony_nc_events; -/* Vaio C* --maybe also FE*, N* and AR* ?-- special init sequence -* for Fn keys +/* Some Vaio models require additional steps to enable +* Fn keys */ -static int sony_nc_C_enable (const struct dmi_system_id *id) +static int sony_SNC_enable_cb (const struct dmi_system_id *id) {int result =0 ;
@@ -840,7 +840,7 @@ static int sony_nc_C_enable(const struct dmi_system_id *id)return 0 ; } -static struct sony_nc_event sony_C_events[] = { +static struct sony_nc_event sony_SNC_events[] = { {0x81 ,SONYPI_EVENT_FNKEY_F1 }, {0x01 ,SONYPI_EVENT_FNKEY_RELEASED }, {0x82 ,SONYPI_EVENT_FNKEY_F2 },
@@ -869,8 +869,8 @@ static struct sony_nc_event sony_C_events[] = {static const struct dmi_system_id sony_nc_ids[] = { { .ident ="Sony Vaio FE Series" , - .callback = sony_nc_C_enable, - .driver_data = sony_C_events, + .callback = sony_SNC_enable_cb, + .driver_data = sony_SNC_events, .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"Sony Corporation" ),DMI_MATCH (DMI_PRODUCT_NAME ,"VGN-FE" ),
@@ -878,8 +878,8 @@ static const struct dmi_system_id sony_nc_ids[] = { }, { .ident = "Sony Vaio FW Series", - .callback = sony_nc_C_enable, - .driver_data = sony_C_events, + .callback = sony_SNC_enable_cb, + .driver_data = sony_SNC_events, .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"Sony Corporation" ), DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FW"),
@@ -887,8 +887,8 @@ static const struct dmi_system_id sony_nc_ids[] = { }, { .ident = "Sony Vaio FZ Series", - .callback = sony_nc_C_enable, - .driver_data = sony_C_events, + .callback = sony_SNC_enable_cb, + .driver_data = sony_SNC_events, .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"Sony Corporation" ), DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ"),
@@ -896,8 +896,8 @@ static const struct dmi_system_id sony_nc_ids[] = { }, { .ident = "Sony Vaio C Series", - .callback = sony_nc_C_enable, - .driver_data = sony_C_events, + .callback = sony_SNC_enable_cb, + .driver_data = sony_SNC_events, .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"Sony Corporation" ), DMI_MATCH(DMI_PRODUCT_NAME, "VGN-C"),
@@ -905,8 +905,8 @@ static const struct dmi_system_id sony_nc_ids[] = { }, { .ident = "Sony Vaio N Series", - .callback = sony_nc_C_enable, - .driver_data = sony_C_events, + .callback = sony_SNC_enable_cb, + .driver_data = sony_SNC_events, .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"Sony Corporation" ), DMI_MATCH(DMI_PRODUCT_NAME, "VGN-N"),
@@ -914,8 +914,8 @@ static const struct dmi_system_id sony_nc_ids[] = { }, { .ident = "Sony Vaio Z Series", - .callback = sony_nc_C_enable, - .driver_data = sony_C_events, + .callback = sony_SNC_enable_cb, + .driver_data = sony_SNC_events, .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"Sony Corporation" ), DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z"),
Signature · 1 line
1.6.1.3
Mattia Dongili
maintainerPATCH 9/9 add Sony Vaio VGN-SR19 support
In reply to Mattia DongiliFrom: Wolfram Strepp <[email protected]>
I have a Sony Vaio VGN-SR19XN, running with Debian Lenny, and i had a problem with some function keys: Backlight Up/Down (Fn-F5/F6), Hibernate (Fn-F12), and some others, were not working. I have described the problem in detail here (at the bottom):
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/251665
--- drivers/platform/x86/sony-laptop.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
drivers/platform/x86/sony-laptop.c +9 -0
@@ -921,6 +921,15 @@ static const struct dmi_system_id sony_nc_ids[] = { DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z"), }, }, + { + .ident = "Sony Vaio SR Series", + .callback = sony_SNC_enable_cb, + .driver_data = sony_SNC_events, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SR"), + }, + }, { } };
Signature · 1 line
1.6.1.3
Len Brown
reviewerI snapped these up when i was traveling -- I think I didn't get a chance to reply.
a couple of nits for next time...
Subject: [PATCH a/b] [sony-laptop] bla bla bla
should be:
Subject: [PATCH a/b] sony-laptop: bla bla bla
because everything between []'s get deleted by git-am
Also, some of the From: and Signed-off-by's were not quite right. If you're not the original author, then the From: for the author should be the first line in the body. It doesn't again go down by the Signed-off-by:. Also, the orignal author should have the 1st signed-off-by line, as they're generally intended to show the path that the patch took to the kernel...
thanks,
Len Brown, Intel Open Source Technology Center