aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-07-08 04:47:21 -0400
committerMatthew Garrett <matthew.garrett@nebula.com>2014-08-16 04:23:50 -0400
commitd8c66f62992dac3a92cbc5f16791557100c7a068 (patch)
treee36c0ca00da555d77a4547bb7733edff0f2967ee /drivers/platform
parentce363c2bcb2303e7fad3a79398db739c6995141b (diff)
asus-wmi: Disable acpi-video backlight on desktop machines
Some Asus motherboards for desktop PC-s export an acpi-video interface advertising backlight support. Test the dmi chassis-type and tell acpi-video to not register a backlight interface on desktops. https://bugzilla.redhat.com/show_bug.cgi?id=1097436 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/asus-wmi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 3c6ccedc82b6..70aec19f50f3 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -46,6 +46,7 @@
46#include <linux/platform_device.h> 46#include <linux/platform_device.h>
47#include <linux/thermal.h> 47#include <linux/thermal.h>
48#include <linux/acpi.h> 48#include <linux/acpi.h>
49#include <linux/dmi.h>
49#include <acpi/video.h> 50#include <acpi/video.h>
50 51
51#include "asus-wmi.h" 52#include "asus-wmi.h"
@@ -1734,6 +1735,7 @@ static int asus_wmi_add(struct platform_device *pdev)
1734 struct platform_driver *pdrv = to_platform_driver(pdev->dev.driver); 1735 struct platform_driver *pdrv = to_platform_driver(pdev->dev.driver);
1735 struct asus_wmi_driver *wdrv = to_asus_wmi_driver(pdrv); 1736 struct asus_wmi_driver *wdrv = to_asus_wmi_driver(pdrv);
1736 struct asus_wmi *asus; 1737 struct asus_wmi *asus;
1738 const char *chassis_type;
1737 acpi_status status; 1739 acpi_status status;
1738 int err; 1740 int err;
1739 u32 result; 1741 u32 result;
@@ -1770,6 +1772,11 @@ static int asus_wmi_add(struct platform_device *pdev)
1770 if (err) 1772 if (err)
1771 goto fail_rfkill; 1773 goto fail_rfkill;
1772 1774
1775 /* Some Asus desktop boards export an acpi-video backlight interface,
1776 stop this from showing up */
1777 chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE);
1778 if (chassis_type && !strcmp(chassis_type, "3"))
1779 acpi_video_dmi_promote_vendor();
1773 if (asus->driver->quirks->wmi_backlight_power) 1780 if (asus->driver->quirks->wmi_backlight_power)
1774 acpi_video_dmi_promote_vendor(); 1781 acpi_video_dmi_promote_vendor();
1775 if (!acpi_video_backlight_support()) { 1782 if (!acpi_video_backlight_support()) {