diff options
Diffstat (limited to 'drivers/platform/x86/asus-nb-wmi.c')
-rw-r--r-- | drivers/platform/x86/asus-nb-wmi.c | 80 |
1 files changed, 67 insertions, 13 deletions
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c index ddf0eefd862c..3a4951f46065 100644 --- a/drivers/platform/x86/asus-nb-wmi.c +++ b/drivers/platform/x86/asus-nb-wmi.c | |||
@@ -70,17 +70,35 @@ static struct quirk_entry quirk_asus_x55u = { | |||
70 | .no_display_toggle = true, | 70 | .no_display_toggle = true, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static struct quirk_entry quirk_asus_x401u = { | 73 | static struct quirk_entry quirk_asus_wapf4 = { |
74 | .wapf = 4, | 74 | .wapf = 4, |
75 | }; | 75 | }; |
76 | 76 | ||
77 | static struct quirk_entry quirk_asus_x200ca = { | ||
78 | .wapf = 2, | ||
79 | }; | ||
80 | |||
77 | static int dmi_matched(const struct dmi_system_id *dmi) | 81 | static int dmi_matched(const struct dmi_system_id *dmi) |
78 | { | 82 | { |
79 | quirks = dmi->driver_data; | 83 | quirks = dmi->driver_data; |
80 | return 1; | 84 | return 1; |
81 | } | 85 | } |
82 | 86 | ||
83 | static struct dmi_system_id asus_quirks[] = { | 87 | static const struct dmi_system_id asus_quirks[] = { |
88 | { | ||
89 | .callback = dmi_matched, | ||
90 | .ident = "ASUSTeK COMPUTER INC. U32U", | ||
91 | .matches = { | ||
92 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."), | ||
93 | DMI_MATCH(DMI_PRODUCT_NAME, "U32U"), | ||
94 | }, | ||
95 | /* | ||
96 | * Note this machine has a Brazos APU, and most Brazos Asus | ||
97 | * machines need quirk_asus_x55u / wmi_backlight_power but | ||
98 | * here acpi-video seems to work fine for backlight control. | ||
99 | */ | ||
100 | .driver_data = &quirk_asus_wapf4, | ||
101 | }, | ||
84 | { | 102 | { |
85 | .callback = dmi_matched, | 103 | .callback = dmi_matched, |
86 | .ident = "ASUSTeK COMPUTER INC. X401U", | 104 | .ident = "ASUSTeK COMPUTER INC. X401U", |
@@ -97,7 +115,7 @@ static struct dmi_system_id asus_quirks[] = { | |||
97 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | 115 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
98 | DMI_MATCH(DMI_PRODUCT_NAME, "X401A"), | 116 | DMI_MATCH(DMI_PRODUCT_NAME, "X401A"), |
99 | }, | 117 | }, |
100 | .driver_data = &quirk_asus_x401u, | 118 | .driver_data = &quirk_asus_wapf4, |
101 | }, | 119 | }, |
102 | { | 120 | { |
103 | .callback = dmi_matched, | 121 | .callback = dmi_matched, |
@@ -106,7 +124,7 @@ static struct dmi_system_id asus_quirks[] = { | |||
106 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | 124 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
107 | DMI_MATCH(DMI_PRODUCT_NAME, "X401A1"), | 125 | DMI_MATCH(DMI_PRODUCT_NAME, "X401A1"), |
108 | }, | 126 | }, |
109 | .driver_data = &quirk_asus_x401u, | 127 | .driver_data = &quirk_asus_wapf4, |
110 | }, | 128 | }, |
111 | { | 129 | { |
112 | .callback = dmi_matched, | 130 | .callback = dmi_matched, |
@@ -124,7 +142,7 @@ static struct dmi_system_id asus_quirks[] = { | |||
124 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | 142 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
125 | DMI_MATCH(DMI_PRODUCT_NAME, "X501A"), | 143 | DMI_MATCH(DMI_PRODUCT_NAME, "X501A"), |
126 | }, | 144 | }, |
127 | .driver_data = &quirk_asus_x401u, | 145 | .driver_data = &quirk_asus_wapf4, |
128 | }, | 146 | }, |
129 | { | 147 | { |
130 | .callback = dmi_matched, | 148 | .callback = dmi_matched, |
@@ -133,7 +151,7 @@ static struct dmi_system_id asus_quirks[] = { | |||
133 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | 151 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
134 | DMI_MATCH(DMI_PRODUCT_NAME, "X501A1"), | 152 | DMI_MATCH(DMI_PRODUCT_NAME, "X501A1"), |
135 | }, | 153 | }, |
136 | .driver_data = &quirk_asus_x401u, | 154 | .driver_data = &quirk_asus_wapf4, |
137 | }, | 155 | }, |
138 | { | 156 | { |
139 | .callback = dmi_matched, | 157 | .callback = dmi_matched, |
@@ -142,7 +160,25 @@ static struct dmi_system_id asus_quirks[] = { | |||
142 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | 160 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
143 | DMI_MATCH(DMI_PRODUCT_NAME, "X550CA"), | 161 | DMI_MATCH(DMI_PRODUCT_NAME, "X550CA"), |
144 | }, | 162 | }, |
145 | .driver_data = &quirk_asus_x401u, | 163 | .driver_data = &quirk_asus_wapf4, |
164 | }, | ||
165 | { | ||
166 | .callback = dmi_matched, | ||
167 | .ident = "ASUSTeK COMPUTER INC. X550CC", | ||
168 | .matches = { | ||
169 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | ||
170 | DMI_MATCH(DMI_PRODUCT_NAME, "X550CC"), | ||
171 | }, | ||
172 | .driver_data = &quirk_asus_wapf4, | ||
173 | }, | ||
174 | { | ||
175 | .callback = dmi_matched, | ||
176 | .ident = "ASUSTeK COMPUTER INC. X550CL", | ||
177 | .matches = { | ||
178 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | ||
179 | DMI_MATCH(DMI_PRODUCT_NAME, "X550CL"), | ||
180 | }, | ||
181 | .driver_data = &quirk_asus_wapf4, | ||
146 | }, | 182 | }, |
147 | { | 183 | { |
148 | .callback = dmi_matched, | 184 | .callback = dmi_matched, |
@@ -151,7 +187,7 @@ static struct dmi_system_id asus_quirks[] = { | |||
151 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | 187 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
152 | DMI_MATCH(DMI_PRODUCT_NAME, "X55A"), | 188 | DMI_MATCH(DMI_PRODUCT_NAME, "X55A"), |
153 | }, | 189 | }, |
154 | .driver_data = &quirk_asus_x401u, | 190 | .driver_data = &quirk_asus_wapf4, |
155 | }, | 191 | }, |
156 | { | 192 | { |
157 | .callback = dmi_matched, | 193 | .callback = dmi_matched, |
@@ -160,7 +196,7 @@ static struct dmi_system_id asus_quirks[] = { | |||
160 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | 196 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
161 | DMI_MATCH(DMI_PRODUCT_NAME, "X55C"), | 197 | DMI_MATCH(DMI_PRODUCT_NAME, "X55C"), |
162 | }, | 198 | }, |
163 | .driver_data = &quirk_asus_x401u, | 199 | .driver_data = &quirk_asus_wapf4, |
164 | }, | 200 | }, |
165 | { | 201 | { |
166 | .callback = dmi_matched, | 202 | .callback = dmi_matched, |
@@ -178,7 +214,7 @@ static struct dmi_system_id asus_quirks[] = { | |||
178 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | 214 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
179 | DMI_MATCH(DMI_PRODUCT_NAME, "X55VD"), | 215 | DMI_MATCH(DMI_PRODUCT_NAME, "X55VD"), |
180 | }, | 216 | }, |
181 | .driver_data = &quirk_asus_x401u, | 217 | .driver_data = &quirk_asus_wapf4, |
182 | }, | 218 | }, |
183 | { | 219 | { |
184 | .callback = dmi_matched, | 220 | .callback = dmi_matched, |
@@ -187,7 +223,16 @@ static struct dmi_system_id asus_quirks[] = { | |||
187 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | 223 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
188 | DMI_MATCH(DMI_PRODUCT_NAME, "X75A"), | 224 | DMI_MATCH(DMI_PRODUCT_NAME, "X75A"), |
189 | }, | 225 | }, |
190 | .driver_data = &quirk_asus_x401u, | 226 | .driver_data = &quirk_asus_wapf4, |
227 | }, | ||
228 | { | ||
229 | .callback = dmi_matched, | ||
230 | .ident = "ASUSTeK COMPUTER INC. X75VBP", | ||
231 | .matches = { | ||
232 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | ||
233 | DMI_MATCH(DMI_PRODUCT_NAME, "X75VBP"), | ||
234 | }, | ||
235 | .driver_data = &quirk_asus_wapf4, | ||
191 | }, | 236 | }, |
192 | { | 237 | { |
193 | .callback = dmi_matched, | 238 | .callback = dmi_matched, |
@@ -196,7 +241,7 @@ static struct dmi_system_id asus_quirks[] = { | |||
196 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | 241 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
197 | DMI_MATCH(DMI_PRODUCT_NAME, "1015E"), | 242 | DMI_MATCH(DMI_PRODUCT_NAME, "1015E"), |
198 | }, | 243 | }, |
199 | .driver_data = &quirk_asus_x401u, | 244 | .driver_data = &quirk_asus_wapf4, |
200 | }, | 245 | }, |
201 | { | 246 | { |
202 | .callback = dmi_matched, | 247 | .callback = dmi_matched, |
@@ -205,7 +250,16 @@ static struct dmi_system_id asus_quirks[] = { | |||
205 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | 250 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
206 | DMI_MATCH(DMI_PRODUCT_NAME, "1015U"), | 251 | DMI_MATCH(DMI_PRODUCT_NAME, "1015U"), |
207 | }, | 252 | }, |
208 | .driver_data = &quirk_asus_x401u, | 253 | .driver_data = &quirk_asus_wapf4, |
254 | }, | ||
255 | { | ||
256 | .callback = dmi_matched, | ||
257 | .ident = "ASUSTeK COMPUTER INC. X200CA", | ||
258 | .matches = { | ||
259 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | ||
260 | DMI_MATCH(DMI_PRODUCT_NAME, "X200CA"), | ||
261 | }, | ||
262 | .driver_data = &quirk_asus_x200ca, | ||
209 | }, | 263 | }, |
210 | {}, | 264 | {}, |
211 | }; | 265 | }; |