diff options
-rw-r--r-- | drivers/platform/x86/Kconfig | 1 | ||||
-rw-r--r-- | drivers/platform/x86/toshiba_acpi.c | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index 97527614141b..f9f205cb1f11 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig | |||
@@ -614,6 +614,7 @@ config ACPI_TOSHIBA | |||
614 | depends on INPUT | 614 | depends on INPUT |
615 | depends on RFKILL || RFKILL = n | 615 | depends on RFKILL || RFKILL = n |
616 | depends on SERIO_I8042 || SERIO_I8042 = n | 616 | depends on SERIO_I8042 || SERIO_I8042 = n |
617 | depends on ACPI_VIDEO || ACPI_VIDEO = n | ||
617 | select INPUT_POLLDEV | 618 | select INPUT_POLLDEV |
618 | select INPUT_SPARSEKMAP | 619 | select INPUT_SPARSEKMAP |
619 | ---help--- | 620 | ---help--- |
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index f624dd56051f..9956b9902bb4 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c | |||
@@ -49,7 +49,9 @@ | |||
49 | #include <linux/workqueue.h> | 49 | #include <linux/workqueue.h> |
50 | #include <linux/i8042.h> | 50 | #include <linux/i8042.h> |
51 | #include <linux/acpi.h> | 51 | #include <linux/acpi.h> |
52 | #include <linux/dmi.h> | ||
52 | #include <linux/uaccess.h> | 53 | #include <linux/uaccess.h> |
54 | #include <acpi/video.h> | ||
53 | 55 | ||
54 | MODULE_AUTHOR("John Belmonte"); | 56 | MODULE_AUTHOR("John Belmonte"); |
55 | MODULE_DESCRIPTION("Toshiba Laptop ACPI Extras Driver"); | 57 | MODULE_DESCRIPTION("Toshiba Laptop ACPI Extras Driver"); |
@@ -264,6 +266,14 @@ static const struct key_entry toshiba_acpi_alt_keymap[] = { | |||
264 | }; | 266 | }; |
265 | 267 | ||
266 | /* | 268 | /* |
269 | * List of models which have a broken acpi-video backlight interface and thus | ||
270 | * need to use the toshiba (vendor) interface instead. | ||
271 | */ | ||
272 | static const struct dmi_system_id toshiba_vendor_backlight_dmi[] = { | ||
273 | {} | ||
274 | }; | ||
275 | |||
276 | /* | ||
267 | * Utility | 277 | * Utility |
268 | */ | 278 | */ |
269 | 279 | ||
@@ -2624,6 +2634,20 @@ static int toshiba_acpi_setup_backlight(struct toshiba_acpi_dev *dev) | |||
2624 | ret = get_tr_backlight_status(dev, &enabled); | 2634 | ret = get_tr_backlight_status(dev, &enabled); |
2625 | dev->tr_backlight_supported = !ret; | 2635 | dev->tr_backlight_supported = !ret; |
2626 | 2636 | ||
2637 | /* | ||
2638 | * Tell acpi-video-detect code to prefer vendor backlight on all | ||
2639 | * systems with transflective backlight and on dmi matched systems. | ||
2640 | */ | ||
2641 | if (dev->tr_backlight_supported || | ||
2642 | dmi_check_system(toshiba_vendor_backlight_dmi)) | ||
2643 | acpi_video_dmi_promote_vendor(); | ||
2644 | |||
2645 | if (acpi_video_backlight_support()) | ||
2646 | return 0; | ||
2647 | |||
2648 | /* acpi-video may have loaded before we called dmi_promote_vendor() */ | ||
2649 | acpi_video_unregister_backlight(); | ||
2650 | |||
2627 | memset(&props, 0, sizeof(props)); | 2651 | memset(&props, 0, sizeof(props)); |
2628 | props.type = BACKLIGHT_PLATFORM; | 2652 | props.type = BACKLIGHT_PLATFORM; |
2629 | props.max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1; | 2653 | props.max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1; |