Commit c9bf8f64 authored by Stelian Pop's avatar Stelian Pop Committed by Greg Kroah-Hartman

[PATCH] sonypi driver update

This corrects a small typo in the previous patch (in the ZOOM button
definition) and adds events generated by the Memory Stick reader on VAIO
U3 laptops (thanks to Kunihiko IMAI).
parent 46eb8948
...@@ -95,6 +95,7 @@ where: ...@@ -95,6 +95,7 @@ where:
SONYPI_ZOOM_MASK 0x0100 SONYPI_ZOOM_MASK 0x0100
SONYPI_THUMBPHRASE_MASK 0x0200 SONYPI_THUMBPHRASE_MASK 0x0200
SONYPI_MEYE_MASK 0x0400 SONYPI_MEYE_MASK 0x0400
SONYPI_MEMORYSTICK_MASK 0x0800
Module use: Module use:
----------- -----------
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#define SONYPI_DRIVER_MAJORVERSION 1 #define SONYPI_DRIVER_MAJORVERSION 1
#define SONYPI_DRIVER_MINORVERSION 15 #define SONYPI_DRIVER_MINORVERSION 16
#define SONYPI_DEVICE_MODEL_TYPE1 1 #define SONYPI_DEVICE_MODEL_TYPE1 1
#define SONYPI_DEVICE_MODEL_TYPE2 2 #define SONYPI_DEVICE_MODEL_TYPE2 2
...@@ -165,6 +165,7 @@ static struct sonypi_irq_list sonypi_type2_irq_list[] = { ...@@ -165,6 +165,7 @@ static struct sonypi_irq_list sonypi_type2_irq_list[] = {
#define SONYPI_ZOOM_MASK 0x00000100 #define SONYPI_ZOOM_MASK 0x00000100
#define SONYPI_THUMBPHRASE_MASK 0x00000200 #define SONYPI_THUMBPHRASE_MASK 0x00000200
#define SONYPI_MEYE_MASK 0x00000400 #define SONYPI_MEYE_MASK 0x00000400
#define SONYPI_MEMORYSTICK_MASK 0x00000800
struct sonypi_event { struct sonypi_event {
u8 data; u8 data;
...@@ -262,7 +263,7 @@ static struct sonypi_event sonypi_lidev[] = { ...@@ -262,7 +263,7 @@ static struct sonypi_event sonypi_lidev[] = {
/* The set of possible zoom events */ /* The set of possible zoom events */
static struct sonypi_event sonypi_zoomev[] = { static struct sonypi_event sonypi_zoomev[] = {
{ 0x3a, SONYPI_EVENT_ZOOM_PRESSED }, { 0x39, SONYPI_EVENT_ZOOM_PRESSED },
{ 0, 0 } { 0, 0 }
}; };
...@@ -279,6 +280,13 @@ static struct sonypi_event sonypi_meyeev[] = { ...@@ -279,6 +280,13 @@ static struct sonypi_event sonypi_meyeev[] = {
{ 0, 0 } { 0, 0 }
}; };
/* The set of possible memorystick events */
static struct sonypi_event sonypi_memorystickev[] = {
{ 0x53, SONYPI_EVENT_MEMORYSTICK_INSERT },
{ 0x54, SONYPI_EVENT_MEMORYSTICK_EJECT },
{ 0, 0 }
};
struct sonypi_eventtypes { struct sonypi_eventtypes {
int model; int model;
u8 data; u8 data;
...@@ -303,6 +311,7 @@ struct sonypi_eventtypes { ...@@ -303,6 +311,7 @@ struct sonypi_eventtypes {
{ SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_HELP_MASK, sonypi_helpev }, { SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_HELP_MASK, sonypi_helpev },
{ SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_ZOOM_MASK, sonypi_zoomev }, { SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_ZOOM_MASK, sonypi_zoomev },
{ SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_THUMBPHRASE_MASK, sonypi_thumbphraseev }, { SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_THUMBPHRASE_MASK, sonypi_thumbphraseev },
{ SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_MEMORYSTICK_MASK, sonypi_memorystickev },
{ 0, 0, 0, 0 } { 0, 0, 0, 0 }
}; };
......
...@@ -91,6 +91,9 @@ ...@@ -91,6 +91,9 @@
#define SONYPI_EVENT_THUMBPHRASE_PRESSED 51 #define SONYPI_EVENT_THUMBPHRASE_PRESSED 51
#define SONYPI_EVENT_MEYE_FACE 52 #define SONYPI_EVENT_MEYE_FACE 52
#define SONYPI_EVENT_MEYE_OPPOSITE 53 #define SONYPI_EVENT_MEYE_OPPOSITE 53
#define SONYPI_EVENT_MEMORYSTICK_INSERT 54
#define SONYPI_EVENT_MEMORYSTICK_EJECT 55
/* get/set brightness */ /* get/set brightness */
#define SONYPI_IOCGBRT _IOR('v', 0, __u8) #define SONYPI_IOCGBRT _IOR('v', 0, __u8)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment