linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Ravi Chandra Sadineni <ravisadineni@chromium.org>
Cc: rafael@kernel.org, chenhong3@huawei.com, ravisadineni@google.com,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
	rajatja@google.com, bleung@google.com, furquan@chromium.org
Subject: Re: [PATCH V3] i8042: Increment wakeup_count for the respective port.
Date: Tue, 12 Jun 2018 16:33:30 -0700	[thread overview]
Message-ID: <20180612233330.GH38773@dtor-ws> (raw)
In-Reply-To: <20180605190124.191827-1-ravisadineni@chromium.org>

On Tue, Jun 05, 2018 at 12:01:24PM -0700, Ravi Chandra Sadineni wrote:
> Call pm_wakeup_event on every irq. This should help us in identifying if
> keyboard was a potential wake reason for the last resume.
> 
> Signed-off-by: Ravi Chandra Sadineni <ravisadineni@chromium.org>

Applied, thank you.

> ---
> V3: Remove the unnecessary device_may_wakeup check.
> V2: Increment the wakeup count only when there is a irq and not when the
> method is called internally.
> 
>  drivers/input/serio/i8042.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
> index 824f4c1c1f310..b8bc71569349d 100644
> --- a/drivers/input/serio/i8042.c
> +++ b/drivers/input/serio/i8042.c
> @@ -573,6 +573,9 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id)
>  	port = &i8042_ports[port_no];
>  	serio = port->exists ? port->serio : NULL;
>  
> +	if (irq && serio)
> +		pm_wakeup_event(&serio->dev, 0);
> +
>  	filter_dbg(port->driver_bound, data, "<- i8042 (interrupt, %d, %d%s%s)\n",
>  		   port_no, irq,
>  		   dfl & SERIO_PARITY ? ", bad parity" : "",
> -- 
> 2.17.1.1185.g55be947832-goog
> 

-- 
Dmitry

  reply	other threads:[~2018-06-12 23:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01 18:00 [PATCH] i8042: Increment wakeup_count for the respective port Ravi Chandra Sadineni
2018-06-02  1:07 ` [PATCH V2] " Ravi Chandra Sadineni
2018-06-04 21:53   ` Dmitry Torokhov
2018-06-05  9:14     ` Rafael J. Wysocki
2018-06-05 19:01       ` [PATCH V3] " Ravi Chandra Sadineni
2018-06-12 23:33         ` Dmitry Torokhov [this message]
2018-06-05 19:06       ` [PATCH V2] " Ravi Chandra Sadineni

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=20180612233330.GH38773@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=bleung@google.com \
    --cc=chenhong3@huawei.com \
    --cc=furquan@chromium.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rajatja@google.com \
    --cc=ravisadineni@chromium.org \
    --cc=ravisadineni@google.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).