linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-input@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH] Input: soc_button_array - Work around DSDTs which modify the irqflags
Date: Sun, 13 Sep 2020 23:09:56 -0700	[thread overview]
Message-ID: <20200914060956.GN1665100@dtor-ws> (raw)
In-Reply-To: <20200906122016.4628-2-hdegoede@redhat.com>

On Sun, Sep 06, 2020 at 02:20:16PM +0200, Hans de Goede wrote:
> Some 2-in-1s which use the soc_button_array driver have this ugly issue in
> their DSDT where the _LID method modifies the irq-type settings of the
> GPIOs used for the power and home buttons. The intend of this AML code is
> to disable these buttons when the lid is closed.
> 
> The AML does this by directly poking the GPIO controllers registers. This
> is problematic because when re-enabling the irq, which happens whenever
> _LID gets called with the lid open (e.g. on boot and on resume), it sets
> the irq-type to IRQ_TYPE_LEVEL_LOW. Where as the gpio-keys driver programs
> the type to, and expects it to be, IRQ_TYPE_EDGE_BOTH.
> 
> This commit adds a workaround for this which (on affected devices) does
> not set gpio_keys_button.gpio on these 2-in-1s, instead it gets the irq for
> the GPIO, configures it as IRQ_TYPE_LEVEL_LOW (to match how the _LID AML
> code configures it) and passes the irq in gpio_keys_button.irq.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Applied, thank you.

-- 
Dmitry

  reply	other threads:[~2020-09-14  6:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-06 12:20 [PATCH 0/1] Input: soc_button_array - Work around DSDTs which modify the irqflags Hans de Goede
2020-09-06 12:20 ` [PATCH] " Hans de Goede
2020-09-14  6:09   ` Dmitry Torokhov [this message]
2020-09-14  6:12 ` [PATCH 0/1] " Dmitry Torokhov
2020-09-14  7:45   ` Hans de Goede
2020-09-14  8:00     ` Andy Shevchenko
2020-09-14 13:52       ` Hans de Goede
2020-09-14 14:08         ` Hans de Goede
2020-09-14 18:05           ` Dmitry Torokhov

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=20200914060956.GN1665100@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-input@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).