rpms/kernel/F-11 kernel.spec, 1.1491, 1.1492 linux-2.6-sony-laptop-rfkill.patch, 1.2, 1.3
Matthew Garrett
mjg59 at fedoraproject.org
Tue Mar 31 15:50:25 UTC 2009
- Previous message (by thread): rpms/coreutils/devel .cvsignore, 1.18, 1.19 coreutils-6.10-configuration.patch, 1.18, 1.19 coreutils.spec, 1.255, 1.256 sources, 1.20, 1.21 coreutils-7.1-cp-a-xattrs.patch, 1.1, NONE coreutils-7.1-cp-recursiveinfloop.patch, 1.1, NONE coreutils-7.1-sort-endoffields.patch, 1.3, NONE
- Next message (by thread): rpms/kdeplasma-addons/devel kdeplasma-addons.spec,1.29,1.30
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mjg59
Update of /cvs/pkgs/rpms/kernel/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31108
Modified Files:
kernel.spec linux-2.6-sony-laptop-rfkill.patch
Log Message:
* Tue Mar 31 2009 Matthew Garrett <mjg at redhat.com>
- update the sony laptop code
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/kernel.spec,v
retrieving revision 1.1491
retrieving revision 1.1492
diff -u -r1.1491 -r1.1492
--- kernel.spec 31 Mar 2009 06:30:02 -0000 1.1491
+++ kernel.spec 31 Mar 2009 15:49:54 -0000 1.1492
@@ -1872,6 +1872,9 @@
# and build.
%changelog
+* Tue Mar 31 2009 Matthew Garrett <mjg at redhat.com>
+- update the sony laptop code
+
* Tue Mar 31 2009 Ben Skeggs <bskeggs at redhat.com>
- drm-nouveau.patch: support version 3.0 pll limits table
may help with rh#492575
linux-2.6-sony-laptop-rfkill.patch:
Index: linux-2.6-sony-laptop-rfkill.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/linux-2.6-sony-laptop-rfkill.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-sony-laptop-rfkill.patch 23 Mar 2009 20:58:38 -0000 1.2
+++ linux-2.6-sony-laptop-rfkill.patch 31 Mar 2009 15:49:55 -0000 1.3
@@ -1,8 +1,23 @@
-diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
-index 537959d..2d142d3 100644
---- a/drivers/platform/x86/sony-laptop.c
-+++ b/drivers/platform/x86/sony-laptop.c
-@@ -64,6 +64,7 @@
+--- vanilla-2.6.29/drivers/platform/x86/sony-laptop.c 2009-03-23 23:12:14.000000000 +0000
++++ linux-2.6.29.noarch/drivers/platform/x86/sony-laptop.c 2009-03-31 16:37:25.000000000 +0100
+@@ -2,7 +2,7 @@
+ * ACPI Sony Notebook Control Driver (SNC and SPIC)
+ *
+ * Copyright (C) 2004-2005 Stelian Pop <stelian at popies.net>
+- * Copyright (C) 2007 Mattia Dongili <malattia at linux.it>
++ * Copyright (C) 2007-2009 Mattia Dongili <malattia at linux.it>
+ *
+ * Parts of this driver inspired from asus_acpi.c and ibm_acpi.c
+ * which are copyrighted by their respective authors.
+@@ -46,7 +46,6 @@
+ #include <linux/module.h>
+ #include <linux/moduleparam.h>
+ #include <linux/init.h>
+-#include <linux/smp_lock.h>
+ #include <linux/types.h>
+ #include <linux/backlight.h>
+ #include <linux/platform_device.h>
+@@ -64,6 +63,7 @@
#include <asm/uaccess.h>
#include <linux/sonypi.h>
#include <linux/sony-laptop.h>
@@ -10,7 +25,7 @@
#ifdef CONFIG_SONYPI_COMPAT
#include <linux/poll.h>
#include <linux/miscdevice.h>
-@@ -123,6 +124,18 @@ MODULE_PARM_DESC(minor,
+@@ -123,6 +123,18 @@
"default is -1 (automatic)");
#endif
@@ -29,7 +44,7 @@
/*********** Input Devices ***********/
#define SONY_LAPTOP_BUF_SIZE 128
-@@ -134,6 +147,7 @@ struct sony_laptop_input_s {
+@@ -134,6 +146,7 @@
spinlock_t fifo_lock;
struct workqueue_struct *wq;
};
@@ -37,25 +52,38 @@
static struct sony_laptop_input_s sony_laptop_input = {
.users = ATOMIC_INIT(0),
};
-@@ -211,6 +225,7 @@ static int sony_laptop_input_index[] = {
+@@ -211,6 +224,14 @@
48, /* 61 SONYPI_EVENT_WIRELESS_OFF */
49, /* 62 SONYPI_EVENT_ZOOM_IN_PRESSED */
50, /* 63 SONYPI_EVENT_ZOOM_OUT_PRESSED */
+ 51, /* 64 SONYPI_EVENT_CD_EJECT_PRESSED */
++ 52, /* 65 SONYPI_EVENT_MODEKEY_PRESSED */
++ 53, /* 66 SONYPI_EVENT_PKEY_P4 */
++ 54, /* 67 SONYPI_EVENT_PKEY_P5 */
++ 55, /* 68 SONYPI_EVENT_SETTINGKEY_PRESSED */
++ 56, /* 69 SONYPI_EVENT_VOLUME_INC_PRESSED */
++ 57, /* 70 SONYPI_EVENT_VOLUME_DEC_PRESSED */
++ -1, /* 71 SONYPI_EVENT_BRIGHTNESS_PRESSED */
};
static int sony_laptop_input_keycode_map[] = {
-@@ -264,7 +279,8 @@ static int sony_laptop_input_keycode_map[] = {
+@@ -264,7 +285,14 @@
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_EJECTCD /* 51 SONYPI_EVENT_CD_EJECT_PRESSED */
++ KEY_EJECTCD, /* 51 SONYPI_EVENT_CD_EJECT_PRESSED */
++ KEY_F13, /* 52 SONYPI_EVENT_MODEKEY_PRESSED */
++ KEY_PROG4, /* 53 SONYPI_EVENT_PKEY_P4 */
++ KEY_F14, /* 54 SONYPI_EVENT_PKEY_P5 */
++ KEY_F15, /* 55 SONYPI_EVENT_SETTINGKEY_PRESSED */
++ KEY_VOLUMEUP, /* 56 SONYPI_EVENT_VOLUME_INC_PRESSED */
++ KEY_VOLUMEDOWN, /* 57 SONYPI_EVENT_VOLUME_DEC_PRESSED */
};
/* release buttons after a short delay if pressed */
-@@ -689,6 +705,31 @@ static int acpi_callsetfunc(acpi_handle handle, char *name, int value,
+@@ -689,6 +717,31 @@
return -1;
}
@@ -64,7 +92,7 @@
+ int i;
+ int result;
+
-+ for (i=0x20; i<0x30; i++) {
++ for (i = 0x20; i < 0x30; i++) {
+ acpi_callsetfunc(sony_nc_acpi_handle, "SN00", i, &result);
+ if (result == handle)
+ return i-0x20;
@@ -87,7 +115,7 @@
/*
* sony_nc_values input/output validate functions
*/
-@@ -809,33 +850,11 @@ struct sony_nc_event {
+@@ -809,87 +862,53 @@
u8 event;
};
@@ -118,15 +146,22 @@
-}
-
-static struct sony_nc_event sony_C_events[] = {
-+static struct sony_nc_event sony_nc_events[] = {
++static struct sony_nc_event sony_100_events[] = {
+ { 0x90, SONYPI_EVENT_PKEY_P1 },
+ { 0x10, SONYPI_EVENT_ANYBUTTON_RELEASED },
+ { 0x91, SONYPI_EVENT_PKEY_P1 },
+ { 0x11, SONYPI_EVENT_ANYBUTTON_RELEASED },
{ 0x81, SONYPI_EVENT_FNKEY_F1 },
{ 0x01, SONYPI_EVENT_FNKEY_RELEASED },
++ { 0x82, SONYPI_EVENT_FNKEY_F2 },
++ { 0x02, SONYPI_EVENT_FNKEY_RELEASED },
++ { 0x83, SONYPI_EVENT_FNKEY_F3 },
++ { 0x03, SONYPI_EVENT_FNKEY_RELEASED },
++ { 0x84, SONYPI_EVENT_FNKEY_F4 },
++ { 0x04, SONYPI_EVENT_FNKEY_RELEASED },
{ 0x85, SONYPI_EVENT_FNKEY_F5 },
-@@ -844,88 +863,53 @@ static struct sony_nc_event sony_C_events[] = {
+ { 0x05, SONYPI_EVENT_FNKEY_RELEASED },
+ { 0x86, SONYPI_EVENT_FNKEY_F6 },
{ 0x06, SONYPI_EVENT_FNKEY_RELEASED },
{ 0x87, SONYPI_EVENT_FNKEY_F7 },
{ 0x07, SONYPI_EVENT_FNKEY_RELEASED },
@@ -180,10 +215,27 @@
- },
- },
- { }
--};
--
++static struct sony_nc_event sony_127_events[] = {
++ { 0x81, SONYPI_EVENT_MODEKEY_PRESSED },
++ { 0x01, SONYPI_EVENT_ANYBUTTON_RELEASED },
++ { 0x82, SONYPI_EVENT_PKEY_P1 },
++ { 0x02, SONYPI_EVENT_ANYBUTTON_RELEASED },
++ { 0x83, SONYPI_EVENT_PKEY_P2 },
++ { 0x03, SONYPI_EVENT_ANYBUTTON_RELEASED },
++ { 0x84, SONYPI_EVENT_PKEY_P3 },
++ { 0x04, SONYPI_EVENT_ANYBUTTON_RELEASED },
++ { 0x85, SONYPI_EVENT_PKEY_P4 },
++ { 0x05, SONYPI_EVENT_ANYBUTTON_RELEASED },
++ { 0x86, SONYPI_EVENT_PKEY_P5 },
++ { 0x06, SONYPI_EVENT_ANYBUTTON_RELEASED },
++ { 0x06, SONYPI_EVENT_ANYBUTTON_RELEASED },
++ { 0x87, SONYPI_EVENT_SETTINGKEY_PRESSED },
++ { 0x07, SONYPI_EVENT_ANYBUTTON_RELEASED },
++ { 0, 0 },
+ };
+
/*
- * ACPI callbacks
+@@ -897,35 +916,51 @@
*/
static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
{
@@ -210,32 +262,46 @@
- }
+ if (ev >= 0x90) {
+ /* New-style event */
-+ int origev = ev;
++ int key_handle = 0;
+ ev -= 0x90;
-
-- if (sony_nc_events)
-- for (evmap = sony_nc_events; evmap->event; evmap++) {
-- if (evmap->data == ev) {
-- ev = evmap->event;
-- break;
-+ if (sony_find_snc_handle(0x100) == ev) {
-+ int i;
+
-+ if (sony_call_snc_handle(0x100, 0x200, &result))
-+ dprintk("sony_acpi_notify, unable to decode event 0x%.2x\n", ev);
++ if (sony_find_snc_handle(0x100) == ev)
++ key_handle = 0x100;
++ if (sony_find_snc_handle(0x127) == ev)
++ key_handle = 0x127;
++
++ if (handle) {
++ struct sony_nc_event *key_event;
++
++ 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
+ ev = result & 0xFF;
+
-+ for (i=0; sony_nc_events[i].event; i++) {
-+ if (sony_nc_events[i].data == ev) {
-+ ev = sony_nc_events[i].event;
++ 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;
+ }
- }
-+
-+ if (!sony_nc_events[i].data)
++ }
+
+- if (sony_nc_events)
+- for (evmap = sony_nc_events; evmap->event; evmap++) {
+- if (evmap->data == ev) {
+- ev = evmap->event;
+- break;
++ if (!key_event->data) {
+ printk(KERN_INFO DRV_PFX
-+ "Unknown event: %x %x\n", origev, ev);
++ "Unknown event: 0x%x 0x%x\n", key_handle,
++ ev);
+ }
+ } else if (sony_find_snc_handle(0x124) == ev) {
+ sony_nc_rfkill_update();
+ return;
@@ -244,11 +310,12 @@
dprintk("sony_acpi_notify, event: 0x%.2x\n", ev);
sony_laptop_report_input_event(ev);
-@@ -953,9 +937,24 @@ static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
+@@ -953,9 +988,25 @@
/*
* ACPI device
*/
-+static int sony_nc_function_setup(struct acpi_device *device) {
++static int sony_nc_function_setup(struct acpi_device *device)
++{
+ int result;
+
+ /* Enable all events */
@@ -269,7 +336,7 @@
for (item = sony_nc_values; item->name; item++) {
int ret;
-@@ -970,13 +969,188 @@ static int sony_nc_resume(struct acpi_device *device)
+@@ -970,13 +1021,188 @@
}
}
@@ -299,7 +366,7 @@
+{
+ int i;
+
-+ for (i=0; i<SONY_RFKILL_MAX; i++) {
++ for (i = 0; i < SONY_RFKILL_MAX; i++) {
+ if (sony_rfkill_devices[i])
+ rfkill_unregister(sony_rfkill_devices[i]);
+ }
@@ -425,7 +492,7 @@
+ int i;
+ enum rfkill_state state;
+
-+ for (i=0; i<SONY_RFKILL_MAX; i++) {
++ for (i = 0; i < SONY_RFKILL_MAX; i++) {
+ if (sony_rfkill_devices[i]) {
+ sony_rfkill_devices[i]->
+ get_state(sony_rfkill_devices[i]->data,
@@ -460,7 +527,7 @@
return 0;
}
-@@ -1024,6 +1198,19 @@ static int sony_nc_add(struct acpi_device *device)
+@@ -1024,6 +1250,19 @@
dprintk("_INI Method failed\n");
}
@@ -480,7 +547,7 @@
/* setup input devices and helper fifo */
result = sony_laptop_setup_input(device);
if (result) {
-@@ -1063,9 +1250,6 @@ static int sony_nc_add(struct acpi_device *device)
+@@ -1063,9 +1302,6 @@
}
@@ -490,7 +557,7 @@
result = sony_pf_add();
if (result)
goto outbacklight;
-@@ -1131,6 +1315,7 @@ static int sony_nc_add(struct acpi_device *device)
+@@ -1131,6 +1367,7 @@
sony_laptop_remove_input();
outwalk:
@@ -498,7 +565,7 @@
return result;
}
-@@ -1156,6 +1341,7 @@ static int sony_nc_remove(struct acpi_device *device, int type)
+@@ -1156,6 +1393,7 @@
sony_pf_remove();
sony_laptop_remove_input();
@@ -506,15 +573,269 @@
dprintk(SONY_NC_DRIVER_NAME " removed.\n");
return 0;
-diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h
-index f41ffd7..8458dbe 100644
---- a/include/linux/sonypi.h
-+++ b/include/linux/sonypi.h
-@@ -103,6 +103,7 @@
+@@ -1195,7 +1433,6 @@
+ #define SONYPI_TYPE1_OFFSET 0x04
+ #define SONYPI_TYPE2_OFFSET 0x12
+ #define SONYPI_TYPE3_OFFSET 0x12
+-#define SONYPI_TYPE4_OFFSET 0x12
+
+ struct sony_pic_ioport {
+ struct acpi_resource_io io1;
+@@ -1328,6 +1565,7 @@
+ { 0x01, SONYPI_EVENT_PKEY_P1 },
+ { 0x02, SONYPI_EVENT_PKEY_P2 },
+ { 0x04, SONYPI_EVENT_PKEY_P3 },
++ { 0x20, SONYPI_EVENT_PKEY_P1 },
+ { 0, 0 }
+ };
+
+@@ -1371,6 +1609,7 @@
+ { 0x39, SONYPI_EVENT_ZOOM_PRESSED },
+ { 0x10, SONYPI_EVENT_ZOOM_IN_PRESSED },
+ { 0x20, SONYPI_EVENT_ZOOM_OUT_PRESSED },
++ { 0x04, SONYPI_EVENT_ZOOM_PRESSED },
+ { 0, 0 }
+ };
+
+@@ -1401,6 +1640,19 @@
+ { 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 },
+@@ -1438,17 +1690,11 @@
+ { 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 },
++ { 0x05, SONYPI_PKEY_MASK, sonypi_volumeev },
++ { 0x05, SONYPI_PKEY_MASK, sonypi_brightnessev },
+ { 0 },
+ };
+
+@@ -1511,11 +1757,11 @@
+ /*
+ * 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 +1791,10 @@
+ },
+ {
+ .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 +1818,21 @@
+ 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;
++ }
++
++ pcidev = pci_get_device(PCI_VENDOR_ID_INTEL,
++ PCI_DEVICE_ID_INTEL_ICH9_1, NULL);
++ if (pcidev) {
++ dev->control = &spic_types[2];
+ goto out;
+ }
+
+@@ -1598,8 +1845,7 @@
+
+ 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 */
+@@ -1754,17 +2000,14 @@
+ EXPORT_SYMBOL(sony_pic_camera_command);
+
+ /* gprs/edge modem (SZ460N and SZ210P), thanks to Joshua Wise */
+-static void sony_pic_set_wwanpower(u8 state)
++static void __sony_pic_set_wwanpower(u8 state)
+ {
+ state = !!state;
+- mutex_lock(&spic_dev.lock);
+- if (spic_dev.wwan_power == state) {
+- mutex_unlock(&spic_dev.lock);
++ if (spic_dev.wwan_power == state)
+ return;
+- }
+ sony_pic_call2(0xB0, state);
++ sony_pic_call1(0x82);
+ spic_dev.wwan_power = state;
+- mutex_unlock(&spic_dev.lock);
+ }
+
+ static ssize_t sony_pic_wwanpower_store(struct device *dev,
+@@ -1776,7 +2019,9 @@
+ return -EINVAL;
+
+ value = simple_strtoul(buffer, NULL, 10);
+- sony_pic_set_wwanpower(value);
++ mutex_lock(&spic_dev.lock);
++ __sony_pic_set_wwanpower(value);
++ mutex_unlock(&spic_dev.lock);
+
+ return count;
+ }
+@@ -1934,10 +2179,15 @@
+ static int sonypi_misc_open(struct inode *inode, struct file *file)
+ {
+ /* Flush input queue on first open */
+- lock_kernel();
++ unsigned long flags;
++
++ spin_lock_irqsave(sonypi_compat.fifo->lock, flags);
++
+ if (atomic_inc_return(&sonypi_compat.open_count) == 1)
+- kfifo_reset(sonypi_compat.fifo);
+- unlock_kernel();
++ __kfifo_reset(sonypi_compat.fifo);
++
++ spin_unlock_irqrestore(sonypi_compat.fifo->lock, flags);
++
+ return 0;
+ }
+
+@@ -1990,8 +2240,8 @@
+ 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;
+@@ -2125,7 +2375,7 @@
+ .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 = {
+--- vanilla-2.6.29/include/linux/sonypi.h 2009-03-23 23:12:14.000000000 +0000
++++ linux-2.6.29.noarch/include/linux/sonypi.h 2009-03-31 16:37:31.000000000 +0100
+@@ -103,6 +103,14 @@
#define SONYPI_EVENT_WIRELESS_OFF 61
#define SONYPI_EVENT_ZOOM_IN_PRESSED 62
#define SONYPI_EVENT_ZOOM_OUT_PRESSED 63
+#define SONYPI_EVENT_CD_EJECT_PRESSED 64
++#define SONYPI_EVENT_MODEKEY_PRESSED 65
++#define SONYPI_EVENT_PKEY_P4 66
++#define SONYPI_EVENT_PKEY_P5 67
++#define SONYPI_EVENT_SETTINGKEY_PRESSED 68
++#define SONYPI_EVENT_VOLUME_INC_PRESSED 69
++#define SONYPI_EVENT_VOLUME_DEC_PRESSED 70
++#define SONYPI_EVENT_BRIGHTNESS_PRESSED 71
/* get/set brightness */
#define SONYPI_IOCGBRT _IOR('v', 0, __u8)
+--- sony-laptop.c.orig 2009-03-29 12:41:44.000000000 +0200
++++ a/drivers/platform/x86/sony-laptop.c 2009-03-31 00:04:23.000000000 +0200
+@@ -865,7 +865,7 @@
+ 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 @@
+ 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))
+@@ -955,15 +955,22 @@
+ printk(KERN_INFO DRV_PFX
+ "Unknown event: 0x%x 0x%x\n", key_handle,
+ ev);
++ /* restore original event number */
++ ev = event;
++ } else {
++ sony_laptop_report_input_event(ev);
++ /* mark event as translated */
++ ev |= 0x8000;
+ }
+ } else if (sony_find_snc_handle(0x124) == ev) {
+ sony_nc_rfkill_update();
+- return;
+- }
+- }
+-
++ /* restore original event number */
++ ev = event;
++ }
++ } 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);
+ }
+
- Previous message (by thread): rpms/coreutils/devel .cvsignore, 1.18, 1.19 coreutils-6.10-configuration.patch, 1.18, 1.19 coreutils.spec, 1.255, 1.256 sources, 1.20, 1.21 coreutils-7.1-cp-a-xattrs.patch, 1.1, NONE coreutils-7.1-cp-recursiveinfloop.patch, 1.1, NONE coreutils-7.1-sort-endoffields.patch, 1.3, NONE
- Next message (by thread): rpms/kdeplasma-addons/devel kdeplasma-addons.spec,1.29,1.30
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list