All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dell-wmi: Add quirk for Dell Inspiron 3138
@ 2013-12-03  6:50 AceLan Kao
  2013-12-03  7:07 ` Matthew Garrett
  0 siblings, 1 reply; 6+ messages in thread
From: AceLan Kao @ 2013-12-03  6:50 UTC (permalink / raw)
  To: platform-driver-x86, Matthew Garrett

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 <acelan.kao@canonical.com>
---
 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-12-04 11:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-03  6:50 [PATCH] dell-wmi: Add quirk for Dell Inspiron 3138 AceLan Kao
2013-12-03  7:07 ` Matthew Garrett
2013-12-03  7:31   ` AceLan Kao
2013-12-03  7:40     ` Matthew Garrett
2013-12-04  8:14       ` AceLan Kao
2013-12-04 11:15         ` Matthew Garrett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.