linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Hans de Goede <hdegoede@redhat.com>, linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: axp20x-pek - Always register interrupt handlers
Date: Tue, 5 May 2020 19:07:58 -0700	[thread overview]
Message-ID: <20200506020758.GC89269@dtor-ws> (raw)
In-Reply-To: <CAGb2v64GYawG7=a3WF=7D3RJjzzXA=GPExq6Ec9PoN_vmyKGkw@mail.gmail.com>

On Mon, May 04, 2020 at 02:08:42PM +0800, Chen-Yu Tsai wrote:
> On Sun, Apr 26, 2020 at 11:58 PM Hans de Goede <hdegoede@redhat.com> wrote:
> >
> > On some X86 devices we do not register an input-device, because the
> > power-button is also handled by the soc_button_array (GPIO) input driver,
> > and we want to avoid reporting power-button presses to userspace twice.
> >
> > Sofar when we did this we also did not register our interrupt handlers,
> > since those were only necessary to report input events.
> >
> > But on at least 2 device models the Medion Akoya E1239T and the GPD win,
> > the GPIO pin used by the soc_button_array driver for the power-button
> > cannot wakeup the system from suspend. Why this does not work is not clear,
> > I've tried comparing the value of all relevant registers on the Cherry
> > Trail SoC, with those from models where this does work. I've checked:
> > PMC registers: FUNC_DIS, FUNC_DIS2, SOIX_WAKE_EN, D3_STS_0, D3_STS_1,
> > D3_STDBY_STS_0, D3_STDBY_STS_1; PMC ACPI I/O regs: PM1_STS_EN, GPE0a_EN
> > and they all have identical contents in the working and non working cases.
> > I suspect that the firmware either sets some unknown register to a value
> > causing this, or that it turns off a power-plane which is necessary for
> > GPIO wakeups to work during suspend.
> >
> > What does work on the Medion Akoya E1239T is letting the AXP288 wakeup
> > the system on a power-button press (the GPD win has a different PMIC).
> >
> > Move the registering of the power-button press/release interrupt-handler
> > from axp20x_pek_probe_input_device() to axp20x_pek_probe() so that the
> > PMIC will wakeup the system on a power-button press, even if we do not
> > register an input device.
> >
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> 
> Looks good to me.
> 
> Acked-by: Chen-Yu Tsai <wens@csie.org>

Applied, thank you.

-- 
Dmitry

      reply	other threads:[~2020-05-06  2:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26 15:57 [PATCH] Input: axp20x-pek - Always register interrupt handlers Hans de Goede
2020-05-04  6:08 ` Chen-Yu Tsai
2020-05-06  2:07   ` Dmitry Torokhov [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=20200506020758.GC89269@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=wens@csie.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).