aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee, Chun-Yi <jlee@suse.com>2012-03-26 15:47:58 -0400
committerMatthew Garrett <mjg@redhat.com>2012-03-26 15:47:58 -0400
commit86924de2a612b275a45e92ba80d6f47d4e97d620 (patch)
tree55e255e741333b52ec8decfd6d5b4eb18ce39a9a
parent41603e9783a24c8c7cce548c0819bdc9e46a585b (diff)
acer-wmi: add quirk table for video backlight vendor mode
There have some acer laptop have broken _BCM implemenation, the AML code wrote value to EC register but firmware didn't change brighenss. Fortunately, the brightness control works on those machines with vendor mode. So, add quirk table for video backlight vendor mode and unregister acpi video interface on those machines. Tested on Acer TravelMate 4750 Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
-rw-r--r--drivers/platform/x86/Kconfig4
-rw-r--r--drivers/platform/x86/acer-wmi.c29
2 files changed, 31 insertions, 2 deletions
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index c5b4bfed7bb4..2a262f5c5c0c 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -26,6 +26,10 @@ config ACER_WMI
26 depends on RFKILL || RFKILL = n 26 depends on RFKILL || RFKILL = n
27 depends on ACPI_WMI 27 depends on ACPI_WMI
28 select INPUT_SPARSEKMAP 28 select INPUT_SPARSEKMAP
29 # Acer WMI depends on ACPI_VIDEO when ACPI is enabled
30 # but for select to work, need to select ACPI_VIDEO's dependencies, ick
31 select VIDEO_OUTPUT_CONTROL if ACPI
32 select ACPI_VIDEO if ACPI
29 ---help--- 33 ---help---
30 This is a driver for newer Acer (and Wistron) laptops. It adds 34 This is a driver for newer Acer (and Wistron) laptops. It adds
31 wireless radio and bluetooth control, and on some laptops, 35 wireless radio and bluetooth control, and on some laptops,
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index b253e219297e..c1a3fd8e1243 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -43,6 +43,7 @@
43#include <linux/input/sparse-keymap.h> 43#include <linux/input/sparse-keymap.h>
44 44
45#include <acpi/acpi_drivers.h> 45#include <acpi/acpi_drivers.h>
46#include <acpi/video.h>
46 47
47MODULE_AUTHOR("Carlos Corbacho"); 48MODULE_AUTHOR("Carlos Corbacho");
48MODULE_DESCRIPTION("Acer Laptop WMI Extras Driver"); 49MODULE_DESCRIPTION("Acer Laptop WMI Extras Driver");
@@ -506,6 +507,25 @@ static struct dmi_system_id acer_quirks[] = {
506 {} 507 {}
507}; 508};
508 509
510static int video_set_backlight_video_vendor(const struct dmi_system_id *d)
511{
512 interface->capability &= ~ACER_CAP_BRIGHTNESS;
513 pr_info("Brightness must be controlled by generic video driver\n");
514 return 0;
515}
516
517static const struct dmi_system_id video_vendor_dmi_table[] = {
518 {
519 .callback = video_set_backlight_video_vendor,
520 .ident = "Acer TravelMate 4750",
521 .matches = {
522 DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
523 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4750"),
524 },
525 },
526 {}
527};
528
509/* Find which quirks are needed for a particular vendor/ model pair */ 529/* Find which quirks are needed for a particular vendor/ model pair */
510static void find_quirks(void) 530static void find_quirks(void)
511{ 531{
@@ -2017,8 +2037,13 @@ static int __init acer_wmi_init(void)
2017 set_quirks(); 2037 set_quirks();
2018 2038
2019 if (acpi_video_backlight_support()) { 2039 if (acpi_video_backlight_support()) {
2020 interface->capability &= ~ACER_CAP_BRIGHTNESS; 2040 if (dmi_check_system(video_vendor_dmi_table)) {
2021 pr_info("Brightness must be controlled by generic video driver\n"); 2041 acpi_video_unregister();
2042 } else {
2043 interface->capability &= ~ACER_CAP_BRIGHTNESS;
2044 pr_info("Brightness must be controlled by "
2045 "acpi video driver\n");
2046 }
2022 } 2047 }
2023 2048
2024 if (wmi_has_guid(WMID_GUID3)) { 2049 if (wmi_has_guid(WMID_GUID3)) {