summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/asus-wmi.c
diff options
context:
space:
mode:
authorAceLan Kao <acelan.kao@canonical.com>2012-06-13 09:32:06 +0200
committerMatthew Garrett <mjg@redhat.com>2012-07-28 00:11:49 -0400
commit272c77d55672ef92eda9d5e24a5a7ac62df9c431 (patch)
tree8c960ccb629eb89e638810a96195573313d617d1 /drivers/platform/x86/asus-wmi.c
parente052067df00592b1b62d1d438191b931f2009cbb (diff)
downloadblackbird-op-linux-272c77d55672ef92eda9d5e24a5a7ac62df9c431.tar.gz
blackbird-op-linux-272c77d55672ef92eda9d5e24a5a7ac62df9c431.zip
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/asus-wmi.c')
-rw-r--r--drivers/platform/x86/asus-wmi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 556cbb455ed2..486f836b79df 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -47,6 +47,9 @@
#include <linux/thermal.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
+#ifdef CONFIG_ACPI_VIDEO
+#include <acpi/video.h>
+#endif
#include "asus-wmi.h"
@@ -1676,7 +1679,13 @@ static int asus_wmi_add(struct platform_device *pdev)
if (err)
goto fail_rfkill;
+ if (asus->driver->quirks->wmi_backlight_power)
+ acpi_video_dmi_promote_vendor();
if (!acpi_video_backlight_support()) {
+#ifdef CONFIG_ACPI_VIDEO
+ pr_info("Disabling ACPI video driver\n");
+ acpi_video_unregister();
+#endif
err = asus_wmi_backlight_init(asus);
if (err && err != -ENODEV)
goto fail_backlight;
OpenPOWER on IntegriCloud