All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: intel: add blacklist list for XPS machines
@ 2016-10-05  5:57 AceLan Kao
  2016-10-05  7:57 ` Calvin Johnson
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: AceLan Kao @ 2016-10-05  5:57 UTC (permalink / raw)
  To: Mika Westerberg, Heikki Krogerus, Linus Walleij, linux-gpio

The touchscreen on some Dell machines stop working after
closing and opening the lid after this driver is introduced.
So, I add a dmi list to black out those machines that doesn't
work well with this driver.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
---
 drivers/pinctrl/intel/pinctrl-sunrisepoint.c | 33 ++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/drivers/pinctrl/intel/pinctrl-sunrisepoint.c b/drivers/pinctrl/intel/pinctrl-sunrisepoint.c
index c725a53..f0e6c97 100644
--- a/drivers/pinctrl/intel/pinctrl-sunrisepoint.c
+++ b/drivers/pinctrl/intel/pinctrl-sunrisepoint.c
@@ -15,6 +15,7 @@
 #include <linux/platform_device.h>
 #include <linux/pm.h>
 #include <linux/pinctrl/pinctrl.h>
+#include <linux/dmi.h>
 
 #include "pinctrl-intel.h"
 
@@ -554,6 +555,35 @@ static const struct acpi_device_id spt_pinctrl_acpi_match[] = {
 };
 MODULE_DEVICE_TABLE(acpi, spt_pinctrl_acpi_match);
 
+static int pinctrl_blacklist_callback(const struct dmi_system_id *id)
+{
+	pr_info("Blacklisted pinctrl-sunrisepoint for %s\n", id->ident);
+	return 1;
+}
+
+static const struct dmi_system_id pinctrl_blacklist[] = {
+	/* This driver leads to XPS(2015/2016) touchscreen failed to work
+	 * after lid close/open, so try not to load this module
+	 */
+	{
+		.callback = pinctrl_blacklist_callback,
+		.ident = "Dell XPS 13",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9350"),
+		},
+	},
+	{
+		.callback = pinctrl_blacklist_callback,
+		.ident = "Dell XPS 13",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9360"),
+		},
+	},
+	{ }     /* terminating entry */
+};
+
 static int spt_pinctrl_probe(struct platform_device *pdev)
 {
 	const struct intel_pinctrl_soc_data *soc_data;
@@ -563,6 +593,9 @@ static int spt_pinctrl_probe(struct platform_device *pdev)
 	if (!id || !id->driver_data)
 		return -ENODEV;
 
+	if (dmi_check_system(pinctrl_blacklist))
+		return -ENODEV;
+
 	soc_data = (const struct intel_pinctrl_soc_data *)id->driver_data;
 	return intel_pinctrl_probe(pdev, soc_data);
 }
-- 
2.7.4


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

end of thread, other threads:[~2016-10-20 12:01 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-05  5:57 [PATCH] pinctrl: intel: add blacklist list for XPS machines AceLan Kao
2016-10-05  7:57 ` Calvin Johnson
2016-10-05  8:55   ` Mika Westerberg
2016-10-05  9:23     ` AceLan Kao
2016-10-05  9:32       ` Mika Westerberg
2016-10-05 12:47         ` AceLan Kao
2016-10-10 13:39           ` [PATCH] pinctrl: intel: Only restore pins that are used by the driver Mika Westerberg
2016-10-10 14:37             ` Mario.Limonciello
2016-10-10 14:53               ` Mika Westerberg
2016-10-11  1:31                 ` AceLan Kao
2016-10-11  2:38                   ` AceLan Kao
2016-10-11  9:27                     ` Mika Westerberg
2016-10-12  1:35                       ` AceLan Kao
2016-10-18 12:39             ` Linus Walleij
2016-10-12 16:31 ` [PATCH] pinctrl: intel: add blacklist list for XPS machines Jon Masters
2016-10-18 12:43 ` Linus Walleij
2016-10-18 12:46   ` Mika Westerberg
2016-10-20 12:01     ` Linus Walleij

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.