diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-11 19:48:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-11 19:48:49 -0500 |
commit | e3d183c035f6125d7d9ead23a727d9573bef7fd1 (patch) | |
tree | 05a49a28317a37cc3e7300cce19e2fedda3708c9 | |
parent | 5f3a5cb8e7d7334cfc42312ff58292bb0e7f5941 (diff) | |
parent | 8ec4b736d709562193566156c0dd40e327df2cbb (diff) |
Merge tag 'platform-drivers-x86-v4.9-3' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86
Pull x86 platform driver fixes from Darren Hart:
"Minor doc fix, a DMI match for ideapad and a fix to toshiba-wmi to
avoid loading on non-toshiba systems.
Documentation/ABI:
- ibm_rtl: The "What:" fields are incomplete
toshiba-wmi:
- Fix loading the driver on non Toshiba laptops
ideapad-laptop:
- Add another DMI entry for Yoga 900"
* tag 'platform-drivers-x86-v4.9-3' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
Documentation/ABI: ibm_rtl: The "What:" fields are incomplete
toshiba-wmi: Fix loading the driver on non Toshiba laptops
ideapad-laptop: Add another DMI entry for Yoga 900
-rw-r--r-- | Documentation/ABI/testing/sysfs-devices-system-ibm-rtl | 4 | ||||
-rw-r--r-- | drivers/platform/x86/ideapad-laptop.c | 7 | ||||
-rw-r--r-- | drivers/platform/x86/toshiba-wmi.c | 26 |
3 files changed, 28 insertions, 9 deletions
diff --git a/Documentation/ABI/testing/sysfs-devices-system-ibm-rtl b/Documentation/ABI/testing/sysfs-devices-system-ibm-rtl index b82deeaec314..470def06ab0a 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-ibm-rtl +++ b/Documentation/ABI/testing/sysfs-devices-system-ibm-rtl | |||
@@ -1,4 +1,4 @@ | |||
1 | What: state | 1 | What: /sys/devices/system/ibm_rtl/state |
2 | Date: Sep 2010 | 2 | Date: Sep 2010 |
3 | KernelVersion: 2.6.37 | 3 | KernelVersion: 2.6.37 |
4 | Contact: Vernon Mauery <vernux@us.ibm.com> | 4 | Contact: Vernon Mauery <vernux@us.ibm.com> |
@@ -10,7 +10,7 @@ Description: The state file allows a means by which to change in and | |||
10 | Users: The ibm-prtm userspace daemon uses this interface. | 10 | Users: The ibm-prtm userspace daemon uses this interface. |
11 | 11 | ||
12 | 12 | ||
13 | What: version | 13 | What: /sys/devices/system/ibm_rtl/version |
14 | Date: Sep 2010 | 14 | Date: Sep 2010 |
15 | KernelVersion: 2.6.37 | 15 | KernelVersion: 2.6.37 |
16 | Contact: Vernon Mauery <vernux@us.ibm.com> | 16 | Contact: Vernon Mauery <vernux@us.ibm.com> |
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index a2323941e677..a7614fc542b5 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c | |||
@@ -934,6 +934,13 @@ static const struct dmi_system_id no_hw_rfkill_list[] = { | |||
934 | }, | 934 | }, |
935 | }, | 935 | }, |
936 | { | 936 | { |
937 | .ident = "Lenovo Yoga 900", | ||
938 | .matches = { | ||
939 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
940 | DMI_MATCH(DMI_BOARD_NAME, "VIUU4"), | ||
941 | }, | ||
942 | }, | ||
943 | { | ||
937 | .ident = "Lenovo YOGA 910-13IKB", | 944 | .ident = "Lenovo YOGA 910-13IKB", |
938 | .matches = { | 945 | .matches = { |
939 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | 946 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
diff --git a/drivers/platform/x86/toshiba-wmi.c b/drivers/platform/x86/toshiba-wmi.c index feac4576b837..2df07ee8f3c3 100644 --- a/drivers/platform/x86/toshiba-wmi.c +++ b/drivers/platform/x86/toshiba-wmi.c | |||
@@ -24,14 +24,15 @@ | |||
24 | #include <linux/acpi.h> | 24 | #include <linux/acpi.h> |
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <linux/input/sparse-keymap.h> | 26 | #include <linux/input/sparse-keymap.h> |
27 | #include <linux/dmi.h> | ||
27 | 28 | ||
28 | MODULE_AUTHOR("Azael Avalos"); | 29 | MODULE_AUTHOR("Azael Avalos"); |
29 | MODULE_DESCRIPTION("Toshiba WMI Hotkey Driver"); | 30 | MODULE_DESCRIPTION("Toshiba WMI Hotkey Driver"); |
30 | MODULE_LICENSE("GPL"); | 31 | MODULE_LICENSE("GPL"); |
31 | 32 | ||
32 | #define TOSHIBA_WMI_EVENT_GUID "59142400-C6A3-40FA-BADB-8A2652834100" | 33 | #define WMI_EVENT_GUID "59142400-C6A3-40FA-BADB-8A2652834100" |
33 | 34 | ||
34 | MODULE_ALIAS("wmi:"TOSHIBA_WMI_EVENT_GUID); | 35 | MODULE_ALIAS("wmi:"WMI_EVENT_GUID); |
35 | 36 | ||
36 | static struct input_dev *toshiba_wmi_input_dev; | 37 | static struct input_dev *toshiba_wmi_input_dev; |
37 | 38 | ||
@@ -63,6 +64,16 @@ static void toshiba_wmi_notify(u32 value, void *context) | |||
63 | kfree(response.pointer); | 64 | kfree(response.pointer); |
64 | } | 65 | } |
65 | 66 | ||
67 | static struct dmi_system_id toshiba_wmi_dmi_table[] __initdata = { | ||
68 | { | ||
69 | .ident = "Toshiba laptop", | ||
70 | .matches = { | ||
71 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
72 | }, | ||
73 | }, | ||
74 | {} | ||
75 | }; | ||
76 | |||
66 | static int __init toshiba_wmi_input_setup(void) | 77 | static int __init toshiba_wmi_input_setup(void) |
67 | { | 78 | { |
68 | acpi_status status; | 79 | acpi_status status; |
@@ -81,7 +92,7 @@ static int __init toshiba_wmi_input_setup(void) | |||
81 | if (err) | 92 | if (err) |
82 | goto err_free_dev; | 93 | goto err_free_dev; |
83 | 94 | ||
84 | status = wmi_install_notify_handler(TOSHIBA_WMI_EVENT_GUID, | 95 | status = wmi_install_notify_handler(WMI_EVENT_GUID, |
85 | toshiba_wmi_notify, NULL); | 96 | toshiba_wmi_notify, NULL); |
86 | if (ACPI_FAILURE(status)) { | 97 | if (ACPI_FAILURE(status)) { |
87 | err = -EIO; | 98 | err = -EIO; |
@@ -95,7 +106,7 @@ static int __init toshiba_wmi_input_setup(void) | |||
95 | return 0; | 106 | return 0; |
96 | 107 | ||
97 | err_remove_notifier: | 108 | err_remove_notifier: |
98 | wmi_remove_notify_handler(TOSHIBA_WMI_EVENT_GUID); | 109 | wmi_remove_notify_handler(WMI_EVENT_GUID); |
99 | err_free_keymap: | 110 | err_free_keymap: |
100 | sparse_keymap_free(toshiba_wmi_input_dev); | 111 | sparse_keymap_free(toshiba_wmi_input_dev); |
101 | err_free_dev: | 112 | err_free_dev: |
@@ -105,7 +116,7 @@ static int __init toshiba_wmi_input_setup(void) | |||
105 | 116 | ||
106 | static void toshiba_wmi_input_destroy(void) | 117 | static void toshiba_wmi_input_destroy(void) |
107 | { | 118 | { |
108 | wmi_remove_notify_handler(TOSHIBA_WMI_EVENT_GUID); | 119 | wmi_remove_notify_handler(WMI_EVENT_GUID); |
109 | sparse_keymap_free(toshiba_wmi_input_dev); | 120 | sparse_keymap_free(toshiba_wmi_input_dev); |
110 | input_unregister_device(toshiba_wmi_input_dev); | 121 | input_unregister_device(toshiba_wmi_input_dev); |
111 | } | 122 | } |
@@ -114,7 +125,8 @@ static int __init toshiba_wmi_init(void) | |||
114 | { | 125 | { |
115 | int ret; | 126 | int ret; |
116 | 127 | ||
117 | if (!wmi_has_guid(TOSHIBA_WMI_EVENT_GUID)) | 128 | if (!wmi_has_guid(WMI_EVENT_GUID) || |
129 | !dmi_check_system(toshiba_wmi_dmi_table)) | ||
118 | return -ENODEV; | 130 | return -ENODEV; |
119 | 131 | ||
120 | ret = toshiba_wmi_input_setup(); | 132 | ret = toshiba_wmi_input_setup(); |
@@ -130,7 +142,7 @@ static int __init toshiba_wmi_init(void) | |||
130 | 142 | ||
131 | static void __exit toshiba_wmi_exit(void) | 143 | static void __exit toshiba_wmi_exit(void) |
132 | { | 144 | { |
133 | if (wmi_has_guid(TOSHIBA_WMI_EVENT_GUID)) | 145 | if (wmi_has_guid(WMI_EVENT_GUID)) |
134 | toshiba_wmi_input_destroy(); | 146 | toshiba_wmi_input_destroy(); |
135 | } | 147 | } |
136 | 148 | ||