All of lore.kernel.org
 help / color / mirror / Atom feed
From: Calvin Johnson <linux.cj@gmail.com>
To: AceLan Kao <acelan.kao@canonical.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org
Subject: Re: [PATCH] pinctrl: intel: add blacklist list for XPS machines
Date: Wed, 5 Oct 2016 13:27:31 +0530	[thread overview]
Message-ID: <CAEhpT-WvLqfzfxrsRB_+tifq4tESnz_HqdaFb=0VUjff2=3-mg@mail.gmail.com> (raw)
In-Reply-To: <1475647025-25617-1-git-send-email-acelan.kao@canonical.com>

On Wed, Oct 5, 2016 at 11:27 AM, AceLan Kao <acelan.kao@canonical.com> wrote:
> 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.

Why don't you find out what in the driver is causing this problem,
instead of avoiding the driver  loading altogether?

>
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-10-05  7:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05  5:57 [PATCH] pinctrl: intel: add blacklist list for XPS machines AceLan Kao
2016-10-05  7:57 ` Calvin Johnson [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEhpT-WvLqfzfxrsRB_+tifq4tESnz_HqdaFb=0VUjff2=3-mg@mail.gmail.com' \
    --to=linux.cj@gmail.com \
    --cc=acelan.kao@canonical.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.