aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/eeepc-wmi.c
diff options
context:
space:
mode:
authorAceLan Kao <acelan.kao@canonical.com>2012-06-13 03:32:06 -0400
committerMatthew Garrett <mjg@redhat.com>2012-07-28 00:11:49 -0400
commit272c77d55672ef92eda9d5e24a5a7ac62df9c431 (patch)
tree8c960ccb629eb89e638810a96195573313d617d1 /drivers/platform/x86/eeepc-wmi.c
parente052067df00592b1b62d1d438191b931f2009cbb (diff)
asus-wmi: control backlight power through WMI, not ACPI
BugLink: https://bugs.launchpad.net/bugs/1000146 Some h/w that can adjust screen brightness through ACPI functions, but can't turn on/off the backlight power correctly. So, we list those h/w in quirks and try to turn on/off the backlight power through WMI. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Corentin Chary <corentin.chary@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform/x86/eeepc-wmi.c')
-rw-r--r--drivers/platform/x86/eeepc-wmi.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index 656761380342..5838332ea5bd 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -79,7 +79,7 @@ static const struct key_entry eeepc_wmi_keymap[] = {
79 { KE_KEY, 0xe1, { KEY_F14 } }, /* Change Resolution */ 79 { KE_KEY, 0xe1, { KEY_F14 } }, /* Change Resolution */
80 { KE_KEY, HOME_PRESS, { KEY_CONFIG } }, /* Home/Express gate key */ 80 { KE_KEY, HOME_PRESS, { KEY_CONFIG } }, /* Home/Express gate key */
81 { KE_KEY, 0xe8, { KEY_SCREENLOCK } }, 81 { KE_KEY, 0xe8, { KEY_SCREENLOCK } },
82 { KE_KEY, 0xe9, { KEY_BRIGHTNESS_ZERO } }, 82 { KE_KEY, 0xe9, { KEY_DISPLAYTOGGLE } },
83 { KE_KEY, 0xeb, { KEY_CAMERA_ZOOMOUT } }, 83 { KE_KEY, 0xeb, { KEY_CAMERA_ZOOMOUT } },
84 { KE_KEY, 0xec, { KEY_CAMERA_UP } }, 84 { KE_KEY, 0xec, { KEY_CAMERA_UP } },
85 { KE_KEY, 0xed, { KEY_CAMERA_DOWN } }, 85 { KE_KEY, 0xed, { KEY_CAMERA_DOWN } },
@@ -107,6 +107,11 @@ static struct quirk_entry quirk_asus_et2012_type3 = {
107 .store_backlight_power = true, 107 .store_backlight_power = true,
108}; 108};
109 109
110static struct quirk_entry quirk_asus_x101ch = {
111 /* We need this when ACPI function doesn't do this well */
112 .wmi_backlight_power = true,
113};
114
110static struct quirk_entry *quirks; 115static struct quirk_entry *quirks;
111 116
112static void et2012_quirks(void) 117static void et2012_quirks(void)
@@ -157,6 +162,24 @@ static struct dmi_system_id asus_quirks[] = {
157 }, 162 },
158 .driver_data = &quirk_asus_unknown, 163 .driver_data = &quirk_asus_unknown,
159 }, 164 },
165 {
166 .callback = dmi_matched,
167 .ident = "ASUSTeK Computer INC. X101CH",
168 .matches = {
169 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
170 DMI_MATCH(DMI_PRODUCT_NAME, "X101CH"),
171 },
172 .driver_data = &quirk_asus_x101ch,
173 },
174 {
175 .callback = dmi_matched,
176 .ident = "ASUSTeK Computer INC. 1015CX",
177 .matches = {
178 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
179 DMI_MATCH(DMI_PRODUCT_NAME, "1015CX"),
180 },
181 .driver_data = &quirk_asus_x101ch,
182 },
160 {}, 183 {},
161}; 184};
162 185