27 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
29 #include <linux/kernel.h>
30 #include <linux/module.h>
32 #include <linux/input.h>
40 #define EEEPC_WMI_FILE "eeepc-wmi"
46 #define EEEPC_ACPI_HID "ASUS010"
48 #define EEEPC_WMI_EVENT_GUID "ABBC0F72-8EA1-11D1-00A0-C90629100000"
52 static bool hotplug_wireless;
56 "Enable hotplug for wireless device. "
57 "If your laptop needs that, please report to "
61 #define HOME_PRESS 0xe4
62 #define HOME_HOLD 0xea
63 #define HOME_RELEASE 0xe5
65 static const struct key_entry eeepc_wmi_keymap[] = {
98 .hotplug_wireless =
true,
101 static struct quirk_entry quirk_asus_et2012_type1 = {
102 .store_backlight_power =
true,
105 static struct quirk_entry quirk_asus_et2012_type3 = {
106 .scalar_panel_brightness =
true,
107 .store_backlight_power =
true,
112 .wmi_backlight_power =
true,
117 static void et2012_quirks(
void)
123 if (
sscanf(dev->
name,
"AEMS%24c", oemstring) == 1) {
124 if (oemstring[18] ==
'1')
125 quirks = &quirk_asus_et2012_type1;
126 else if (oemstring[18] ==
'3')
127 quirks = &quirk_asus_et2012_type3;
137 quirks = dmi->driver_data;
139 model = (
char *)dmi->
matches[1].substr;
148 .callback = dmi_matched,
149 .ident =
"ASUSTeK Computer INC. 1000H",
154 .driver_data = &quirk_asus_1000h,
157 .callback = dmi_matched,
158 .ident =
"ASUSTeK Computer INC. ET2012E/I",
163 .driver_data = &quirk_asus_unknown,
166 .callback = dmi_matched,
167 .ident =
"ASUSTeK Computer INC. X101CH",
172 .driver_data = &quirk_asus_x101ch,
175 .callback = dmi_matched,
176 .ident =
"ASUSTeK Computer INC. 1015CX",
181 .driver_data = &quirk_asus_x101ch,
187 unsigned int *
value,
bool *autorelease)
209 *(
bool *)context =
true;
213 static int eeepc_wmi_check_atkd(
void)
228 if (eeepc_wmi_check_atkd()) {
229 pr_warn(
"WMI device present, but legacy ATKD device is also "
230 "present and enabled\n");
231 pr_warn(
"You probably booted with acpi_osi=\"Linux\" or "
232 "acpi_osi=\"!Windows 2009\"\n");
233 pr_warn(
"Can't load eeepc-wmi, use default acpi_osi "
234 "(preferred) or eeepc-laptop\n");
242 quirks = &quirk_asus_unknown;
248 driver->
quirks->wapf = -1;
256 .keymap = eeepc_wmi_keymap,
257 .input_name =
"Eee PC WMI hotkeys",
259 .key_filter = eeepc_wmi_key_filter,
260 .probe = eeepc_wmi_probe,
261 .detect_quirks = eeepc_wmi_quirks,
265 static int __init eeepc_wmi_init(
void)
270 static void __exit eeepc_wmi_exit(
void)