The acpi_video0 interface doesn't not work on Dell Inspiron 3138,
so using the vendor brightness interface, instead of the acpi one.

Signed-off-by: AceLan Kao <[email protected]>
---
 drivers/platform/x86/dell-laptop.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/platform/x86/dell-laptop.c 
b/drivers/platform/x86/dell-laptop.c
index c608b1d..9d2a4af 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -62,6 +62,7 @@ struct calling_interface_structure {
 
 struct quirk_entry {
        u8 touchpad_led;
+       u8 vendor_backlight;
 };
 
 static struct quirk_entry *quirks;
@@ -70,6 +71,10 @@ static struct quirk_entry quirk_dell_vostro_v130 = {
        .touchpad_led = 1,
 };
 
+static struct quirk_entry quirk_dell_inspiron_3138 = {
+       .vendor_backlight = 1,
+};
+
 static int dmi_matched(const struct dmi_system_id *dmi)
 {
        quirks = dmi->driver_data;
@@ -268,6 +273,15 @@ static struct dmi_system_id dell_quirks[] = {
                },
                .driver_data = &quirk_dell_vostro_v130,
        },
+       {
+               .callback = dmi_matched,
+               .ident = "Dell Inspiron 3138",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 3138"),
+               },
+               .driver_data = &quirk_dell_inspiron_3138,
+       },
        { }
 };
 
@@ -843,6 +857,9 @@ static int __init dell_init(void)
                                    &dell_debugfs_fops);
 
 #ifdef CONFIG_ACPI
+       if (quirks && quirks->vendor_backlight)
+               acpi_video_dmi_promote_vendor();
+
        /* In the event of an ACPI backlight being available, don't
         * register the platform controller.
         */
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" 
in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to