asus-nb-wmi.c 14.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/*
 * Asus Notebooks WMI hotkey driver
 *
 * Copyright(C) 2010 Corentin Chary <corentin.chary@gmail.com>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
28
#include <linux/fb.h>
29
#include <linux/dmi.h>
30
#include <linux/i8042.h>
31 32 33 34 35

#include "asus-wmi.h"

#define	ASUS_NB_WMI_FILE	"asus-nb-wmi"

C
Corentin Chary 已提交
36
MODULE_AUTHOR("Corentin Chary <corentin.chary@gmail.com>");
37 38 39 40 41 42 43
MODULE_DESCRIPTION("Asus Notebooks WMI Hotkey Driver");
MODULE_LICENSE("GPL");

#define ASUS_NB_WMI_EVENT_GUID	"0B3CBB35-E3C2-45ED-91C2-4C5A6D195D1C"

MODULE_ALIAS("wmi:"ASUS_NB_WMI_EVENT_GUID);

44 45 46 47 48 49 50 51 52
/*
 * WAPF defines the behavior of the Fn+Fx wlan key
 * The significance of values is yet to be found, but
 * most of the time:
 * Bit | Bluetooth | WLAN
 *  0  | Hardware  | Hardware
 *  1  | Hardware  | Software
 *  4  | Software  | Software
 */
53
static int wapf = -1;
54 55 56
module_param(wapf, uint, 0444);
MODULE_PARM_DESC(wapf, "WAPF value");

57 58
static struct quirk_entry *quirks;

59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
static bool asus_q500a_i8042_filter(unsigned char data, unsigned char str,
			      struct serio *port)
{
	static bool extended;
	bool ret = false;

	if (str & I8042_STR_AUXDATA)
		return false;

	if (unlikely(data == 0xe1)) {
		extended = true;
		ret = true;
	} else if (unlikely(extended)) {
		extended = false;
		ret = true;
	}

	return ret;
}

79
static struct quirk_entry quirk_asus_unknown = {
80 81 82
	.wapf = 0,
};

83 84 85 86
static struct quirk_entry quirk_asus_q500a = {
	.i8042_filter = asus_q500a_i8042_filter,
};

A
AceLan Kao 已提交
87 88 89 90 91 92 93 94 95 96 97
/*
 * For those machines that need software to control bt/wifi status
 * and can't adjust brightness through ACPI interface
 * and have duplicate events(ACPI and WMI) for display toggle
 */
static struct quirk_entry quirk_asus_x55u = {
	.wapf = 4,
	.wmi_backlight_power = true,
	.no_display_toggle = true,
};

98
static struct quirk_entry quirk_asus_wapf4 = {
99 100 101
	.wapf = 4,
};

102 103 104 105
static struct quirk_entry quirk_asus_x200ca = {
	.wapf = 2,
};

106 107 108 109
static struct quirk_entry quirk_asus_ux303ub = {
	.wmi_backlight_native = true,
};

110 111 112 113
static struct quirk_entry quirk_asus_x550lb = {
	.xusb2pr = 0x01D9,
};

114
static struct quirk_entry quirk_asus_forceals = {
115 116 117
	.wmi_force_als_set = true,
};

118 119
static int dmi_matched(const struct dmi_system_id *dmi)
{
120
	pr_info("Identified laptop model '%s'\n", dmi->ident);
121 122 123 124
	quirks = dmi->driver_data;
	return 1;
}

125
static const struct dmi_system_id asus_quirks[] = {
126 127 128 129 130 131 132 133 134
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. Q500A",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "Q500A"),
		},
		.driver_data = &quirk_asus_q500a,
	},
135 136 137 138 139 140 141 142 143 144 145 146 147 148
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. U32U",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
			DMI_MATCH(DMI_PRODUCT_NAME, "U32U"),
		},
		/*
		 * Note this machine has a Brazos APU, and most Brazos Asus
		 * machines need quirk_asus_x55u / wmi_backlight_power but
		 * here acpi-video seems to work fine for backlight control.
		 */
		.driver_data = &quirk_asus_wapf4,
	},
149 150 151 152 153 154 155 156 157
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X302UA",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X302UA"),
		},
		.driver_data = &quirk_asus_wapf4,
	},
158 159 160 161 162 163 164
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X401U",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X401U"),
		},
A
AceLan Kao 已提交
165 166 167 168 169 170 171 172 173
		.driver_data = &quirk_asus_x55u,
	},
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X401A",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X401A"),
		},
174
		.driver_data = &quirk_asus_wapf4,
175 176 177 178 179 180 181 182
	},
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X401A1",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X401A1"),
		},
183
		.driver_data = &quirk_asus_wapf4,
184
	},
185 186 187 188 189 190 191 192 193
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X45U",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X45U"),
		},
		.driver_data = &quirk_asus_wapf4,
	},
194 195 196 197 198 199 200
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X456UA",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X456UA"),
		},
201
		.driver_data = &quirk_asus_wapf4,
202 203 204 205 206 207 208 209
	},
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X456UF",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X456UF"),
		},
210
		.driver_data = &quirk_asus_wapf4,
211
	},
212 213 214 215 216 217 218
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X501U",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X501U"),
		},
A
AceLan Kao 已提交
219 220 221 222 223 224 225 226 227
		.driver_data = &quirk_asus_x55u,
	},
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X501A",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X501A"),
		},
228
		.driver_data = &quirk_asus_wapf4,
229 230 231 232 233 234 235 236
	},
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X501A1",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X501A1"),
		},
237
		.driver_data = &quirk_asus_wapf4,
238
	},
239 240 241 242 243 244 245
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X550CA",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X550CA"),
		},
246
		.driver_data = &quirk_asus_wapf4,
247
	},
248 249 250 251 252 253 254 255 256
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X550CC",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X550CC"),
		},
		.driver_data = &quirk_asus_wapf4,
	},
257 258 259 260 261 262 263 264 265
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X550CL",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X550CL"),
		},
		.driver_data = &quirk_asus_wapf4,
	},
266 267 268 269 270 271 272 273 274
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X550VB",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X550VB"),
		},
		.driver_data = &quirk_asus_wapf4,
	},
275 276 277 278 279 280 281 282 283
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X551CA",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X551CA"),
		},
		.driver_data = &quirk_asus_wapf4,
	},
284 285 286 287 288 289 290
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X55A",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X55A"),
		},
291
		.driver_data = &quirk_asus_wapf4,
292 293 294 295 296 297 298 299
	},
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X55C",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X55C"),
		},
300
		.driver_data = &quirk_asus_wapf4,
301 302 303 304 305 306 307 308
	},
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X55U",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X55U"),
		},
A
AceLan Kao 已提交
309
		.driver_data = &quirk_asus_x55u,
310 311 312 313 314 315 316 317
	},
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X55VD",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X55VD"),
		},
318
		.driver_data = &quirk_asus_wapf4,
319 320 321 322 323 324 325 326
	},
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X75A",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X75A"),
		},
327
		.driver_data = &quirk_asus_wapf4,
328
	},
329 330 331 332 333 334 335
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X75VBP",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X75VBP"),
		},
336
		.driver_data = &quirk_asus_wapf4,
337
	},
338 339 340 341 342 343 344 345 346
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X75VD",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X75VD"),
		},
		.driver_data = &quirk_asus_wapf4,
	},
347 348 349 350 351 352 353
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. 1015E",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "1015E"),
		},
354
		.driver_data = &quirk_asus_wapf4,
355 356 357 358 359 360 361 362
	},
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. 1015U",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "1015U"),
		},
363
		.driver_data = &quirk_asus_wapf4,
364
	},
365 366 367 368 369 370 371 372 373
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X200CA",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X200CA"),
		},
		.driver_data = &quirk_asus_x200ca,
	},
374 375 376 377 378 379 380 381 382
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. UX303UB",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "UX303UB"),
		},
		.driver_data = &quirk_asus_ux303ub,
	},
383 384 385 386 387 388 389
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. UX330UAK",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "UX330UAK"),
		},
390
		.driver_data = &quirk_asus_forceals,
391
	},
392 393 394 395 396 397 398 399 400
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. X550LB",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "X550LB"),
		},
		.driver_data = &quirk_asus_x550lb,
	},
401 402 403 404 405 406 407 408 409
	{
		.callback = dmi_matched,
		.ident = "ASUSTeK COMPUTER INC. UX430UQ",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "UX430UQ"),
		},
		.driver_data = &quirk_asus_forceals,
	},
410
	{},
411 412
};

413 414
static void asus_nb_wmi_quirks(struct asus_wmi_driver *driver)
{
415 416
	int ret;

417 418 419 420
	quirks = &quirk_asus_unknown;
	dmi_check_system(asus_quirks);

	driver->quirks = quirks;
421
	driver->panel_power = FB_BLANK_UNBLANK;
422 423 424 425 426 427

	/* overwrite the wapf setting if the wapf paramater is specified */
	if (wapf != -1)
		quirks->wapf = wapf;
	else
		wapf = quirks->wapf;
428 429 430 431 432 433 434 435 436

	if (quirks->i8042_filter) {
		ret = i8042_install_filter(quirks->i8042_filter);
		if (ret) {
			pr_warn("Unable to install key filter\n");
			return;
		}
		pr_info("Using i8042 filter function for receiving events\n");
	}
437 438
}

439
static const struct key_entry asus_nb_wmi_keymap[] = {
440 441
	{ KE_KEY, ASUS_WMI_BRN_DOWN, { KEY_BRIGHTNESSDOWN } },
	{ KE_KEY, ASUS_WMI_BRN_UP, { KEY_BRIGHTNESSUP } },
442 443 444 445 446 447 448
	{ KE_KEY, 0x30, { KEY_VOLUMEUP } },
	{ KE_KEY, 0x31, { KEY_VOLUMEDOWN } },
	{ KE_KEY, 0x32, { KEY_MUTE } },
	{ KE_KEY, 0x33, { KEY_DISPLAYTOGGLE } }, /* LCD on */
	{ KE_KEY, 0x34, { KEY_DISPLAY_OFF } }, /* LCD off */
	{ KE_KEY, 0x40, { KEY_PREVIOUSSONG } },
	{ KE_KEY, 0x41, { KEY_NEXTSONG } },
449
	{ KE_KEY, 0x43, { KEY_STOPCD } }, /* Stop/Eject */
450
	{ KE_KEY, 0x45, { KEY_PLAYPAUSE } },
451
	{ KE_KEY, 0x4c, { KEY_MEDIA } }, /* WMP Key */
452 453 454
	{ KE_KEY, 0x50, { KEY_EMAIL } },
	{ KE_KEY, 0x51, { KEY_WWW } },
	{ KE_KEY, 0x55, { KEY_CALC } },
455 456
	{ KE_IGNORE, 0x57, },  /* Battery mode */
	{ KE_IGNORE, 0x58, },  /* AC mode */
457
	{ KE_KEY, 0x5C, { KEY_F15 } },  /* Power Gear key */
458 459 460
	{ KE_KEY, 0x5D, { KEY_WLAN } }, /* Wireless console Toggle */
	{ KE_KEY, 0x5E, { KEY_WLAN } }, /* Wireless console Enable */
	{ KE_KEY, 0x5F, { KEY_WLAN } }, /* Wireless console Disable */
461
	{ KE_KEY, 0x60, { KEY_TOUCHPAD_ON } },
462 463 464 465 466 467 468
	{ KE_KEY, 0x61, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD only */
	{ KE_KEY, 0x62, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT only */
	{ KE_KEY, 0x63, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT */
	{ KE_KEY, 0x64, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV */
	{ KE_KEY, 0x65, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + TV */
	{ KE_KEY, 0x66, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + TV */
	{ KE_KEY, 0x67, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV */
469
	{ KE_KEY, 0x6B, { KEY_TOUCHPAD_TOGGLE } },
C
Corentin Chary 已提交
470
	{ KE_IGNORE, 0x6E, },  /* Low Battery notification */
471
	{ KE_KEY, 0x7a, { KEY_ALS_TOGGLE } }, /* Ambient Light Sensor Toggle */
472 473
	{ KE_KEY, 0x7D, { KEY_BLUETOOTH } }, /* Bluetooth Enable */
	{ KE_KEY, 0x7E, { KEY_BLUETOOTH } }, /* Bluetooth Disable */
474
	{ KE_KEY, 0x82, { KEY_CAMERA } },
475 476
	{ KE_KEY, 0x88, { KEY_RFKILL  } }, /* Radio Toggle Key */
	{ KE_KEY, 0x8A, { KEY_PROG1 } }, /* Color enhancement mode */
477 478 479 480 481 482 483 484
	{ KE_KEY, 0x8C, { KEY_SWITCHVIDEOMODE } }, /* SDSP DVI only */
	{ KE_KEY, 0x8D, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + DVI */
	{ KE_KEY, 0x8E, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + DVI */
	{ KE_KEY, 0x8F, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV + DVI */
	{ KE_KEY, 0x90, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + DVI */
	{ KE_KEY, 0x91, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + TV + DVI */
	{ KE_KEY, 0x92, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + TV + DVI */
	{ KE_KEY, 0x93, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV + DVI */
485 486
	{ KE_KEY, 0x95, { KEY_MEDIA } },
	{ KE_KEY, 0x99, { KEY_PHONE } },
487 488 489 490
	{ KE_KEY, 0xA0, { KEY_SWITCHVIDEOMODE } }, /* SDSP HDMI only */
	{ KE_KEY, 0xA1, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + HDMI */
	{ KE_KEY, 0xA2, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + HDMI */
	{ KE_KEY, 0xA3, { KEY_SWITCHVIDEOMODE } }, /* SDSP TV + HDMI */
491 492 493 494
	{ KE_KEY, 0xA4, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + HDMI */
	{ KE_KEY, 0xA5, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + TV + HDMI */
	{ KE_KEY, 0xA6, { KEY_SWITCHVIDEOMODE } }, /* SDSP CRT + TV + HDMI */
	{ KE_KEY, 0xA7, { KEY_SWITCHVIDEOMODE } }, /* SDSP LCD + CRT + TV + HDMI */
495 496 497
	{ KE_KEY, 0xB5, { KEY_CALC } },
	{ KE_KEY, 0xC4, { KEY_KBDILLUMUP } },
	{ KE_KEY, 0xC5, { KEY_KBDILLUMDOWN } },
498
	{ KE_IGNORE, 0xC6, },  /* Ambient Light Sensor notification */
499 500 501 502 503 504 505 506 507 508
	{ KE_END, 0},
};

static struct asus_wmi_driver asus_nb_wmi_driver = {
	.name = ASUS_NB_WMI_FILE,
	.owner = THIS_MODULE,
	.event_guid = ASUS_NB_WMI_EVENT_GUID,
	.keymap = asus_nb_wmi_keymap,
	.input_name = "Asus WMI hotkeys",
	.input_phys = ASUS_NB_WMI_FILE "/input0",
509
	.detect_quirks = asus_nb_wmi_quirks,
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524
};


static int __init asus_nb_wmi_init(void)
{
	return asus_wmi_register_driver(&asus_nb_wmi_driver);
}

static void __exit asus_nb_wmi_exit(void)
{
	asus_wmi_unregister_driver(&asus_nb_wmi_driver);
}

module_init(asus_nb_wmi_init);
module_exit(asus_nb_wmi_exit);