sony-laptop: support new hotkeys on the P, Z and EC series
Add new mappings for assist, VAIO, zoom and eject buttons present on refurbished P, Z and EC models. Reported-by: Gyorgy Jeney <nog.lkml@gmail.com> Reported-by: Stephan Mueller <smueller@chronox.de> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Matthew Garrett <mjg@redhat.com>
This commit is contained in:
parent
0c51a4d8ab
commit
1a7d946993
|
@ -235,6 +235,7 @@ static int sony_laptop_input_index[] = {
|
||||||
57, /* 70 SONYPI_EVENT_VOLUME_DEC_PRESSED */
|
57, /* 70 SONYPI_EVENT_VOLUME_DEC_PRESSED */
|
||||||
-1, /* 71 SONYPI_EVENT_BRIGHTNESS_PRESSED */
|
-1, /* 71 SONYPI_EVENT_BRIGHTNESS_PRESSED */
|
||||||
58, /* 72 SONYPI_EVENT_MEDIA_PRESSED */
|
58, /* 72 SONYPI_EVENT_MEDIA_PRESSED */
|
||||||
|
59, /* 72 SONYPI_EVENT_VENDOR_PRESSED */
|
||||||
};
|
};
|
||||||
|
|
||||||
static int sony_laptop_input_keycode_map[] = {
|
static int sony_laptop_input_keycode_map[] = {
|
||||||
|
@ -297,6 +298,7 @@ static int sony_laptop_input_keycode_map[] = {
|
||||||
KEY_VOLUMEUP, /* 56 SONYPI_EVENT_VOLUME_INC_PRESSED */
|
KEY_VOLUMEUP, /* 56 SONYPI_EVENT_VOLUME_INC_PRESSED */
|
||||||
KEY_VOLUMEDOWN, /* 57 SONYPI_EVENT_VOLUME_DEC_PRESSED */
|
KEY_VOLUMEDOWN, /* 57 SONYPI_EVENT_VOLUME_DEC_PRESSED */
|
||||||
KEY_MEDIA, /* 58 SONYPI_EVENT_MEDIA_PRESSED */
|
KEY_MEDIA, /* 58 SONYPI_EVENT_MEDIA_PRESSED */
|
||||||
|
KEY_VENDOR, /* 59 SONYPI_EVENT_VENDOR_PRESSED */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* release buttons after a short delay if pressed */
|
/* release buttons after a short delay if pressed */
|
||||||
|
@ -894,10 +896,18 @@ static struct sony_nc_event sony_100_events[] = {
|
||||||
{ 0x0A, SONYPI_EVENT_FNKEY_RELEASED },
|
{ 0x0A, SONYPI_EVENT_FNKEY_RELEASED },
|
||||||
{ 0x8C, SONYPI_EVENT_FNKEY_F12 },
|
{ 0x8C, SONYPI_EVENT_FNKEY_F12 },
|
||||||
{ 0x0C, SONYPI_EVENT_FNKEY_RELEASED },
|
{ 0x0C, SONYPI_EVENT_FNKEY_RELEASED },
|
||||||
|
{ 0x9d, SONYPI_EVENT_ZOOM_PRESSED },
|
||||||
|
{ 0x1d, SONYPI_EVENT_ANYBUTTON_RELEASED },
|
||||||
{ 0x9f, SONYPI_EVENT_CD_EJECT_PRESSED },
|
{ 0x9f, SONYPI_EVENT_CD_EJECT_PRESSED },
|
||||||
{ 0x1f, SONYPI_EVENT_ANYBUTTON_RELEASED },
|
{ 0x1f, SONYPI_EVENT_ANYBUTTON_RELEASED },
|
||||||
{ 0xa1, SONYPI_EVENT_MEDIA_PRESSED },
|
{ 0xa1, SONYPI_EVENT_MEDIA_PRESSED },
|
||||||
{ 0x21, SONYPI_EVENT_ANYBUTTON_RELEASED },
|
{ 0x21, SONYPI_EVENT_ANYBUTTON_RELEASED },
|
||||||
|
{ 0xa4, SONYPI_EVENT_CD_EJECT_PRESSED },
|
||||||
|
{ 0x24, SONYPI_EVENT_ANYBUTTON_RELEASED },
|
||||||
|
{ 0xa5, SONYPI_EVENT_VENDOR_PRESSED },
|
||||||
|
{ 0x25, SONYPI_EVENT_ANYBUTTON_RELEASED },
|
||||||
|
{ 0xa6, SONYPI_EVENT_HELP_PRESSED },
|
||||||
|
{ 0x26, SONYPI_EVENT_ANYBUTTON_RELEASED },
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,7 @@
|
||||||
#define SONYPI_EVENT_VOLUME_DEC_PRESSED 70
|
#define SONYPI_EVENT_VOLUME_DEC_PRESSED 70
|
||||||
#define SONYPI_EVENT_BRIGHTNESS_PRESSED 71
|
#define SONYPI_EVENT_BRIGHTNESS_PRESSED 71
|
||||||
#define SONYPI_EVENT_MEDIA_PRESSED 72
|
#define SONYPI_EVENT_MEDIA_PRESSED 72
|
||||||
|
#define SONYPI_EVENT_VENDOR_PRESSED 73
|
||||||
|
|
||||||
/* get/set brightness */
|
/* get/set brightness */
|
||||||
#define SONYPI_IOCGBRT _IOR('v', 0, __u8)
|
#define SONYPI_IOCGBRT _IOR('v', 0, __u8)
|
||||||
|
|
Loading…
Reference in New Issue