aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorMattia Dongili <malattia@linux.it>2009-03-26 08:58:17 -0400
committerLen Brown <len.brown@intel.com>2009-03-27 12:18:44 -0400
commite93c8a6819b217f4f4a490f67f26e02ff6b23b44 (patch)
tree0c09e12559bcc1413c5d64141e123e95994a9495 /drivers/platform
parent45c7942ba8f6b7d5d1147c10f84f0cbf5fa3a2b8 (diff)
sony-laptop: 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. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/sony-laptop.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index e000c9f6cdf5..3e45c65b8f81 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -1423,7 +1423,6 @@ static struct acpi_driver sony_nc_driver = {
1423#define SONYPI_TYPE1_OFFSET 0x04 1423#define SONYPI_TYPE1_OFFSET 0x04
1424#define SONYPI_TYPE2_OFFSET 0x12 1424#define SONYPI_TYPE2_OFFSET 0x12
1425#define SONYPI_TYPE3_OFFSET 0x12 1425#define SONYPI_TYPE3_OFFSET 0x12
1426#define SONYPI_TYPE4_OFFSET 0x12
1427 1426
1428struct sony_pic_ioport { 1427struct sony_pic_ioport {
1429 struct acpi_resource_io io1; 1428 struct acpi_resource_io io1;
@@ -1666,14 +1665,6 @@ static struct sonypi_eventtypes type3_events[] = {
1666 { 0x31, SONYPI_MEMORYSTICK_MASK, sonypi_memorystickev }, 1665 { 0x31, SONYPI_MEMORYSTICK_MASK, sonypi_memorystickev },
1667 { 0x41, SONYPI_BATTERY_MASK, sonypi_batteryev }, 1666 { 0x41, SONYPI_BATTERY_MASK, sonypi_batteryev },
1668 { 0x31, SONYPI_PKEY_MASK, sonypi_pkeyev }, 1667 { 0x31, SONYPI_PKEY_MASK, sonypi_pkeyev },
1669 { 0 },
1670};
1671static struct sonypi_eventtypes type4_events[] = {
1672 { 0, 0xffffffff, sonypi_releaseev },
1673 { 0x21, SONYPI_FNKEY_MASK, sonypi_fnkeyev },
1674 { 0x31, SONYPI_WIRELESS_MASK, sonypi_wlessev },
1675 { 0x31, SONYPI_MEMORYSTICK_MASK, sonypi_memorystickev },
1676 { 0x41, SONYPI_BATTERY_MASK, sonypi_batteryev },
1677 { 0x05, SONYPI_PKEY_MASK, sonypi_pkeyev }, 1668 { 0x05, SONYPI_PKEY_MASK, sonypi_pkeyev },
1678 { 0x05, SONYPI_ZOOM_MASK, sonypi_zoomev }, 1669 { 0x05, SONYPI_ZOOM_MASK, sonypi_zoomev },
1679 { 0x05, SONYPI_CAPTURE_MASK, sonypi_captureev }, 1670 { 0x05, SONYPI_CAPTURE_MASK, sonypi_captureev },
@@ -1739,11 +1730,11 @@ static u8 sony_pic_call3(u8 dev, u8 fn, u8 v)
1739/* 1730/*
1740 * minidrivers for SPIC models 1731 * minidrivers for SPIC models
1741 */ 1732 */
1742static int type4_handle_irq(const u8 data_mask, const u8 ev) 1733static int type3_handle_irq(const u8 data_mask, const u8 ev)
1743{ 1734{
1744 /* 1735 /*
1745 * 0x31 could mean we have to take some extra action and wait for 1736 * 0x31 could mean we have to take some extra action and wait for
1746 * the next irq for some Type4 models, it will generate a new 1737 * the next irq for some Type3 models, it will generate a new
1747 * irq and we can read new data from the device: 1738 * irq and we can read new data from the device:
1748 * - 0x5c and 0x5f requires 0xA0 1739 * - 0x5c and 0x5f requires 0xA0
1749 * - 0x61 requires 0xB3 1740 * - 0x61 requires 0xB3
@@ -1773,16 +1764,10 @@ static struct device_ctrl spic_types[] = {
1773 }, 1764 },
1774 { 1765 {
1775 .model = SONYPI_DEVICE_TYPE3, 1766 .model = SONYPI_DEVICE_TYPE3,
1776 .handle_irq = NULL, 1767 .handle_irq = type3_handle_irq,
1777 .evport_offset = SONYPI_TYPE3_OFFSET, 1768 .evport_offset = SONYPI_TYPE3_OFFSET,
1778 .event_types = type3_events, 1769 .event_types = type3_events,
1779 }, 1770 },
1780 {
1781 .model = SONYPI_DEVICE_TYPE4,
1782 .handle_irq = type4_handle_irq,
1783 .evport_offset = SONYPI_TYPE4_OFFSET,
1784 .event_types = type4_events,
1785 },
1786}; 1771};
1787 1772
1788static void sony_pic_detect_device_type(struct sony_pic_dev *dev) 1773static void sony_pic_detect_device_type(struct sony_pic_dev *dev)
@@ -1806,14 +1791,14 @@ static void sony_pic_detect_device_type(struct sony_pic_dev *dev)
1806 pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, 1791 pcidev = pci_get_device(PCI_VENDOR_ID_INTEL,
1807 PCI_DEVICE_ID_INTEL_ICH7_1, NULL); 1792 PCI_DEVICE_ID_INTEL_ICH7_1, NULL);
1808 if (pcidev) { 1793 if (pcidev) {
1809 dev->control = &spic_types[3]; 1794 dev->control = &spic_types[2];
1810 goto out; 1795 goto out;
1811 } 1796 }
1812 1797
1813 pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, 1798 pcidev = pci_get_device(PCI_VENDOR_ID_INTEL,
1814 PCI_DEVICE_ID_INTEL_ICH8_4, NULL); 1799 PCI_DEVICE_ID_INTEL_ICH8_4, NULL);
1815 if (pcidev) { 1800 if (pcidev) {
1816 dev->control = &spic_types[3]; 1801 dev->control = &spic_types[2];
1817 goto out; 1802 goto out;
1818 } 1803 }
1819 1804
@@ -1826,8 +1811,7 @@ out:
1826 1811
1827 printk(KERN_INFO DRV_PFX "detected Type%d model\n", 1812 printk(KERN_INFO DRV_PFX "detected Type%d model\n",
1828 dev->control->model == SONYPI_DEVICE_TYPE1 ? 1 : 1813 dev->control->model == SONYPI_DEVICE_TYPE1 ? 1 :
1829 dev->control->model == SONYPI_DEVICE_TYPE2 ? 2 : 1814 dev->control->model == SONYPI_DEVICE_TYPE2 ? 2 : 3);
1830 dev->control->model == SONYPI_DEVICE_TYPE3 ? 3 : 4);
1831} 1815}
1832 1816
1833/* camera tests and poweron/poweroff */ 1817/* camera tests and poweron/poweroff */