diff options
author | zino lin <linzino7@gmail.com> | 2016-08-28 04:12:06 -0400 |
---|---|---|
committer | Darren Hart <dvhart@linux.intel.com> | 2016-09-23 19:20:34 -0400 |
commit | 999d4376c62828b260fbb59d5ab6bc28918ca448 (patch) | |
tree | bc11cad7c2908dd6cfc6cd66d8829b745a67da28 /drivers/platform | |
parent | fa1bc2a09f5f6c83eeb49686911565d9630ef054 (diff) |
platform/x86: asus-wmi: fix asus ux303ub brightness issue
acpi_video0 doesn't work, asus-wmi brightness interface doesn't work, too.
So, we use native brightness interface to handle the brightness adjustion,
and add quirk_asus_ux303ub.
Signed-off-by: zino lin <linzino7@gmail.com>
Acked-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/asus-nb-wmi.c | 13 | ||||
-rw-r--r-- | drivers/platform/x86/asus-wmi.c | 3 | ||||
-rw-r--r-- | drivers/platform/x86/asus-wmi.h | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c index adecc1c555f0..f4a60e75cd8a 100644 --- a/drivers/platform/x86/asus-nb-wmi.c +++ b/drivers/platform/x86/asus-nb-wmi.c | |||
@@ -87,6 +87,10 @@ static struct quirk_entry quirk_no_rfkill_wapf4 = { | |||
87 | .no_rfkill = true, | 87 | .no_rfkill = true, |
88 | }; | 88 | }; |
89 | 89 | ||
90 | static struct quirk_entry quirk_asus_ux303ub = { | ||
91 | .wmi_backlight_native = true, | ||
92 | }; | ||
93 | |||
90 | static int dmi_matched(const struct dmi_system_id *dmi) | 94 | static int dmi_matched(const struct dmi_system_id *dmi) |
91 | { | 95 | { |
92 | quirks = dmi->driver_data; | 96 | quirks = dmi->driver_data; |
@@ -351,6 +355,15 @@ static const struct dmi_system_id asus_quirks[] = { | |||
351 | }, | 355 | }, |
352 | .driver_data = &quirk_no_rfkill, | 356 | .driver_data = &quirk_no_rfkill, |
353 | }, | 357 | }, |
358 | { | ||
359 | .callback = dmi_matched, | ||
360 | .ident = "ASUSTeK COMPUTER INC. UX303UB", | ||
361 | .matches = { | ||
362 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), | ||
363 | DMI_MATCH(DMI_PRODUCT_NAME, "UX303UB"), | ||
364 | }, | ||
365 | .driver_data = &quirk_asus_ux303ub, | ||
366 | }, | ||
354 | {}, | 367 | {}, |
355 | }; | 368 | }; |
356 | 369 | ||
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 7c093a0b78bb..ce6ca31a2d09 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c | |||
@@ -2084,6 +2084,9 @@ static int asus_wmi_add(struct platform_device *pdev) | |||
2084 | if (asus->driver->quirks->wmi_backlight_power) | 2084 | if (asus->driver->quirks->wmi_backlight_power) |
2085 | acpi_video_set_dmi_backlight_type(acpi_backlight_vendor); | 2085 | acpi_video_set_dmi_backlight_type(acpi_backlight_vendor); |
2086 | 2086 | ||
2087 | if (asus->driver->quirks->wmi_backlight_native) | ||
2088 | acpi_video_set_dmi_backlight_type(acpi_backlight_native); | ||
2089 | |||
2087 | if (acpi_video_get_backlight_type() == acpi_backlight_vendor) { | 2090 | if (acpi_video_get_backlight_type() == acpi_backlight_vendor) { |
2088 | err = asus_wmi_backlight_init(asus); | 2091 | err = asus_wmi_backlight_init(asus); |
2089 | if (err && err != -ENODEV) | 2092 | if (err && err != -ENODEV) |
diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h index 5de1df510ebd..5e220411056d 100644 --- a/drivers/platform/x86/asus-wmi.h +++ b/drivers/platform/x86/asus-wmi.h | |||
@@ -43,6 +43,7 @@ struct quirk_entry { | |||
43 | bool scalar_panel_brightness; | 43 | bool scalar_panel_brightness; |
44 | bool store_backlight_power; | 44 | bool store_backlight_power; |
45 | bool wmi_backlight_power; | 45 | bool wmi_backlight_power; |
46 | bool wmi_backlight_native; | ||
46 | int wapf; | 47 | int wapf; |
47 | /* | 48 | /* |
48 | * For machines with AMD graphic chips, it will send out WMI event | 49 | * For machines with AMD graphic chips, it will send out WMI event |