linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Daniel Drake <drake@endlessm.com>, Chris Chiu <chiu@endlessm.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-gpio@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] pinctrl: intel: Initialize GPIO properly when used through irqchip
Date: Sat, 2 Dec 2017 13:11:30 +0100	[thread overview]
Message-ID: <CACRpkdayJH-z2bnZCiJUy6eg1cDgAjUWGM_DiV0fC+DNAhUwHA@mail.gmail.com> (raw)
In-Reply-To: <20171129132544.33399-1-mika.westerberg@linux.intel.com>

On Wed, Nov 29, 2017 at 2:25 PM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:

> When a GPIO is requested using gpiod_get_* APIs the intel pinctrl driver
> switches the pin to GPIO mode and makes sure interrupts are routed to
> the GPIO hardware instead of IOAPIC. However, if the GPIO is used
> directly through irqchip, as is the case with many I2C-HID devices where
> I2C core automatically configures interrupt for the device, the pin is
> not initialized as GPIO. Instead we rely that the BIOS configures the
> pin accordingly which seems not to be the case at least in Asus X540NA
> SKU3 with Focaltech touchpad.
>
> When the pin is not properly configured it might result weird behaviour
> like interrupts suddenly stop firing completely and the touchpad stops
> responding to user input.
>
> Fix this by properly initializing the pin to GPIO mode also when it is
> used directly through irqchip.
>
> Fixes: 7981c0015af2 ("pinctrl: intel: Add Intel Sunrisepoint pin controller and GPIO support")
> Reported-by: Daniel Drake <drake@endlessm.com>
> Reported-and-tested-by: Chris Chiu <chiu@endlessm.com>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Cc: stable@vger.kernel.org
> ---
> Changes from v1:
>
>   * Renamed __intel_gpio_init_gpio() to intel_gpio_set_gpio_mode()
>   * Added Fixes: and Cc stable@vger.kernel.org
>   * Added Tested-by from Chris Chiu

Patch applied.

Yours,
Linus Walleij

      reply	other threads:[~2017-12-02 12:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29 13:25 [PATCH v2] pinctrl: intel: Initialize GPIO properly when used through irqchip Mika Westerberg
2017-12-02 12:11 ` Linus Walleij [this message]

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=CACRpkdayJH-z2bnZCiJUy6eg1cDgAjUWGM_DiV0fC+DNAhUwHA@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=chiu@endlessm.com \
    --cc=drake@endlessm.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@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 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).