diff options
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 22 | ||||
-rw-r--r-- | include/linux/sonypi.h | 3 |
2 files changed, 25 insertions, 0 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 3e45c65b8f81..4f932889569b 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -230,6 +230,9 @@ static int sony_laptop_input_index[] = { | |||
230 | 53, /* 66 SONYPI_EVENT_PKEY_P4 */ | 230 | 53, /* 66 SONYPI_EVENT_PKEY_P4 */ |
231 | 54, /* 67 SONYPI_EVENT_PKEY_P5 */ | 231 | 54, /* 67 SONYPI_EVENT_PKEY_P5 */ |
232 | 55, /* 68 SONYPI_EVENT_SETTINGKEY_PRESSED */ | 232 | 55, /* 68 SONYPI_EVENT_SETTINGKEY_PRESSED */ |
233 | 56, /* 69 SONYPI_EVENT_VOLUME_INC_PRESSED */ | ||
234 | 57, /* 70 SONYPI_EVENT_VOLUME_DEC_PRESSED */ | ||
235 | -1, /* 71 SONYPI_EVENT_BRIGHTNESS_PRESSED */ | ||
233 | }; | 236 | }; |
234 | 237 | ||
235 | static int sony_laptop_input_keycode_map[] = { | 238 | static int sony_laptop_input_keycode_map[] = { |
@@ -289,6 +292,8 @@ static int sony_laptop_input_keycode_map[] = { | |||
289 | KEY_PROG4, /* 53 SONYPI_EVENT_PKEY_P4 */ | 292 | KEY_PROG4, /* 53 SONYPI_EVENT_PKEY_P4 */ |
290 | KEY_F14, /* 54 SONYPI_EVENT_PKEY_P5 */ | 293 | KEY_F14, /* 54 SONYPI_EVENT_PKEY_P5 */ |
291 | KEY_F15, /* 55 SONYPI_EVENT_SETTINGKEY_PRESSED */ | 294 | KEY_F15, /* 55 SONYPI_EVENT_SETTINGKEY_PRESSED */ |
295 | KEY_VOLUMEUP, /* 56 SONYPI_EVENT_VOLUME_INC_PRESSED */ | ||
296 | KEY_VOLUMEDOWN, /* 57 SONYPI_EVENT_VOLUME_DEC_PRESSED */ | ||
292 | }; | 297 | }; |
293 | 298 | ||
294 | /* release buttons after a short delay if pressed */ | 299 | /* release buttons after a short delay if pressed */ |
@@ -1555,6 +1560,7 @@ static struct sonypi_event sonypi_pkeyev[] = { | |||
1555 | { 0x01, SONYPI_EVENT_PKEY_P1 }, | 1560 | { 0x01, SONYPI_EVENT_PKEY_P1 }, |
1556 | { 0x02, SONYPI_EVENT_PKEY_P2 }, | 1561 | { 0x02, SONYPI_EVENT_PKEY_P2 }, |
1557 | { 0x04, SONYPI_EVENT_PKEY_P3 }, | 1562 | { 0x04, SONYPI_EVENT_PKEY_P3 }, |
1563 | { 0x20, SONYPI_EVENT_PKEY_P1 }, | ||
1558 | { 0, 0 } | 1564 | { 0, 0 } |
1559 | }; | 1565 | }; |
1560 | 1566 | ||
@@ -1598,6 +1604,7 @@ static struct sonypi_event sonypi_zoomev[] = { | |||
1598 | { 0x39, SONYPI_EVENT_ZOOM_PRESSED }, | 1604 | { 0x39, SONYPI_EVENT_ZOOM_PRESSED }, |
1599 | { 0x10, SONYPI_EVENT_ZOOM_IN_PRESSED }, | 1605 | { 0x10, SONYPI_EVENT_ZOOM_IN_PRESSED }, |
1600 | { 0x20, SONYPI_EVENT_ZOOM_OUT_PRESSED }, | 1606 | { 0x20, SONYPI_EVENT_ZOOM_OUT_PRESSED }, |
1607 | { 0x04, SONYPI_EVENT_ZOOM_PRESSED }, | ||
1601 | { 0, 0 } | 1608 | { 0, 0 } |
1602 | }; | 1609 | }; |
1603 | 1610 | ||
@@ -1628,6 +1635,19 @@ static struct sonypi_event sonypi_batteryev[] = { | |||
1628 | { 0, 0 } | 1635 | { 0, 0 } |
1629 | }; | 1636 | }; |
1630 | 1637 | ||
1638 | /* The set of possible volume events */ | ||
1639 | static struct sonypi_event sonypi_volumeev[] = { | ||
1640 | { 0x01, SONYPI_EVENT_VOLUME_INC_PRESSED }, | ||
1641 | { 0x02, SONYPI_EVENT_VOLUME_DEC_PRESSED }, | ||
1642 | { 0, 0 } | ||
1643 | }; | ||
1644 | |||
1645 | /* The set of possible brightness events */ | ||
1646 | static struct sonypi_event sonypi_brightnessev[] = { | ||
1647 | { 0x80, SONYPI_EVENT_BRIGHTNESS_PRESSED }, | ||
1648 | { 0, 0 } | ||
1649 | }; | ||
1650 | |||
1631 | static struct sonypi_eventtypes type1_events[] = { | 1651 | static struct sonypi_eventtypes type1_events[] = { |
1632 | { 0, 0xffffffff, sonypi_releaseev }, | 1652 | { 0, 0xffffffff, sonypi_releaseev }, |
1633 | { 0x70, SONYPI_MEYE_MASK, sonypi_meyeev }, | 1653 | { 0x70, SONYPI_MEYE_MASK, sonypi_meyeev }, |
@@ -1668,6 +1688,8 @@ static struct sonypi_eventtypes type3_events[] = { | |||
1668 | { 0x05, SONYPI_PKEY_MASK, sonypi_pkeyev }, | 1688 | { 0x05, SONYPI_PKEY_MASK, sonypi_pkeyev }, |
1669 | { 0x05, SONYPI_ZOOM_MASK, sonypi_zoomev }, | 1689 | { 0x05, SONYPI_ZOOM_MASK, sonypi_zoomev }, |
1670 | { 0x05, SONYPI_CAPTURE_MASK, sonypi_captureev }, | 1690 | { 0x05, SONYPI_CAPTURE_MASK, sonypi_captureev }, |
1691 | { 0x05, SONYPI_PKEY_MASK, sonypi_volumeev }, | ||
1692 | { 0x05, SONYPI_PKEY_MASK, sonypi_brightnessev }, | ||
1671 | { 0 }, | 1693 | { 0 }, |
1672 | }; | 1694 | }; |
1673 | 1695 | ||
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index bb835019ac7f..34c4475ac4a2 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
@@ -108,6 +108,9 @@ | |||
108 | #define SONYPI_EVENT_PKEY_P4 66 | 108 | #define SONYPI_EVENT_PKEY_P4 66 |
109 | #define SONYPI_EVENT_PKEY_P5 67 | 109 | #define SONYPI_EVENT_PKEY_P5 67 |
110 | #define SONYPI_EVENT_SETTINGKEY_PRESSED 68 | 110 | #define SONYPI_EVENT_SETTINGKEY_PRESSED 68 |
111 | #define SONYPI_EVENT_VOLUME_INC_PRESSED 69 | ||
112 | #define SONYPI_EVENT_VOLUME_DEC_PRESSED 70 | ||
113 | #define SONYPI_EVENT_BRIGHTNESS_PRESSED 71 | ||
111 | 114 | ||
112 | /* get/set brightness */ | 115 | /* get/set brightness */ |
113 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) | 116 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) |