linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shyam Sundar S K <ssundark@amd.com>
To: Furquan Shaikh <furquan@google.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Shyam-sundar.S-k@amd.com, akshu.agrawal@amd.com,
	adurbin@google.com, dtor@google.com
Subject: Re: [PATCH] pinctrl: amd: Honor IRQ trigger type requested by the caller
Date: Sun, 28 Jun 2020 21:29:45 +0530	[thread overview]
Message-ID: <b7875c51-f99d-1bc0-0ca0-ad44c9cf8652@amd.com> (raw)
In-Reply-To: <20200626211026.513520-1-furquan@google.com>


On 6/27/2020 2:40 AM, Furquan Shaikh wrote:
> [CAUTION: External Email]
>
> This change drops the override in `amd_gpio_irq_set_type()` that
> ignores the IRQ trigger type settings from the caller. The device
> driver (caller) is in a better position to identify the right trigger
> type for the device based on the usage as well as the information
> exposed by the BIOS. There are instances where the device driver might
> want to configure the trigger type differently in different modes. An
> example of this is gpio-keys driver which configures IRQ type as
> trigger on both edges (to identify assert and deassert events) when in
> S0 and reconfigures the trigger type using the information provided by
> the BIOS when going into suspend to ensure that the wake happens on
> the required edge.
>
> This override in `amd_gpio_irq_set_type()` prevents the caller from
> being able to reconfigure trigger type once it is set either based on
> ACPI information or the type used by the first caller for IRQ on a
> given GPIO line.
>
> Without this change, pen-insert gpio key (used by garaged stylus on a
> Chromebook) works fine in S0 (i.e. insert and eject events are
> correctly identified), however, BIOS configuration for wake on only
> pen eject i.e. only-rising edge or only-falling edge is not honored.
>
> With this change, it was verified that pen-insert gpio key behavior is
> correct in both S0 and for wakeup from S3.
>
> Signed-off-by: Furquan Shaikh <furquan@google.com>

Signed-off-by: Shyam Sundar S K<Shyam-sundar.S-k@amd.com>


  reply	other threads:[~2020-06-28 16:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26 21:10 [PATCH] pinctrl: amd: Honor IRQ trigger type requested by the caller Furquan Shaikh
2020-06-28 15:59 ` Shyam Sundar S K [this message]
2020-07-07 12:50 ` 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=b7875c51-f99d-1bc0-0ca0-ad44c9cf8652@amd.com \
    --to=ssundark@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=adurbin@google.com \
    --cc=akshu.agrawal@amd.com \
    --cc=dtor@google.com \
    --cc=furquan@google.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).