From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Adam S Levy <theadamlevy@gmail.com>,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH] pinctrl: cherryview: Add a quirk to make Acer Chromebook keyboard work again
Date: Mon, 3 Apr 2017 11:52:18 -0700 [thread overview]
Message-ID: <20170403185218.GE34530@dtor-ws> (raw)
In-Reply-To: <20170329095932.73368-1-mika.westerberg@linux.intel.com>
On Wed, Mar 29, 2017 at 12:59:32PM +0300, Mika Westerberg wrote:
> After commit 47c950d10202 ("pinctrl: cherryview: Do not add all
> southwest and north GPIOs to IRQ domain") the driver does not add all
> GPIOs to the irqdomain. The reason for that is that those GPIOs cannot
> generate IRQs at all, only GPEs (General Purpose Events). This causes
> Linux virtual IRQ numbering to change.
>
> However, it seems some CYAN Chromebooks, including Acer Chromebook
> hardcodes these Linux IRQ numbers in the ACPI tables of the machine.
> Since the numbering is different now, the IRQ meant for keyboard does
> not match the Linux virtual IRQ number anymore making the keyboard
> non-functional.
>
> Work this around by adding special quirk just for these machines where
> we add back all GPIOs to the irqdomain. Rest of the Cherryview/Braswell
> based machines will not be affected by the change.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=194945
> Fixes: 47c950d10202 ("pinctrl: cherryview: Do not add all southwest and north GPIOs to IRQ domain")
> Reported-by: Adam S Levy <theadamlevy@gmail.com>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
> drivers/pinctrl/intel/pinctrl-cherryview.c | 25 +++++++++++++++++++++++--
> 1 file changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
> index f80134e3e0b6..bbe9cdf36ca4 100644
> --- a/drivers/pinctrl/intel/pinctrl-cherryview.c
> +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
> @@ -13,6 +13,7 @@
> * published by the Free Software Foundation.
> */
>
> +#include <linux/dmi.h>
> #include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/init.h>
> @@ -1524,10 +1525,30 @@ static void chv_gpio_irq_handler(struct irq_desc *desc)
> chained_irq_exit(chip, desc);
> }
>
> +/*
> + * Certain machines seem to hardcode Linux IRQ numbers in their ACPI
> + * tables. Since we leave GPIOs that are not capable of generating
> + * interrupts out of the irqdomain the numbering will be different and
> + * cause devices using the hardcoded IRQ numbers fail. In order not to
> + * break such machines we will only mask pins from irqdomain if the machine
> + * is not listed below.
> + */
> +static const struct dmi_system_id chv_no_valid_mask[] = {
> + {
> + /* See https://bugzilla.kernel.org/show_bug.cgi?id=194945 */
> + .ident = "Acer Chromebook (CYAN)",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "Edgar"),
Is there a BIOS version (I do not have my Cyan with me)? Because if
Intel happens to release a fixes for this hard-coded mapping, we would
not want to continue applying this quirk, would we?
Thanks.
--
Dmitry
next prev parent reply other threads:[~2017-04-03 18:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 9:59 [PATCH] pinctrl: cherryview: Add a quirk to make Acer Chromebook keyboard work again Mika Westerberg
2017-03-29 12:58 ` Linus Walleij
2017-03-29 13:19 ` Mika Westerberg
2017-03-29 13:24 ` Linus Walleij
2017-03-29 16:43 ` Marc Zyngier
2017-03-30 9:00 ` Mika Westerberg
2017-04-06 9:59 ` Mika Westerberg
2017-04-06 10:32 ` Marc Zyngier
2017-04-06 10:50 ` Mika Westerberg
2017-04-06 11:05 ` Marc Zyngier
2017-04-06 13:18 ` Mika Westerberg
2017-04-06 15:15 ` Marc Zyngier
2017-04-07 7:27 ` Linus Walleij
2017-04-03 18:52 ` Dmitry Torokhov [this message]
2017-04-06 8:19 ` Mika Westerberg
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=20170403185218.GE34530@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=theadamlevy@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).