linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>, linux-kernel@vger.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Lee Jones <lee.jones@linaro.org>,
	Doug Anderson <dianders@chromium.org>,
	Andrew Bresticker <abrestic@chromium.org>,
	Sjoerd Simons <sjoerd.simons@collabora.co.uk>,
	Bill Richardson <wfrichar@chromium.org>,
	Todd Broch <tbroch@chromium.org>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH v2] Input: cros_ec_keyb - Clear keyboard state only when it hasn't been a wake source
Date: Wed, 25 Mar 2015 19:45:23 +0100	[thread overview]
Message-ID: <55130243.4000209@collabora.co.uk> (raw)
In-Reply-To: <1427299718-22820-1-git-send-email-tomeu.vizoso@collabora.com>

Hello Tomeu,

On 03/25/2015 05:08 PM, Tomeu Vizoso wrote:
> As the comment right before explains, the keyboard state is to be
> cleared only if the EC wasn't a wakeup source in the last suspend.
> 
> Without this commit, there's an unneeded delay when resuming from
> suspend and we also lose the key that was pressed while suspended.
> 
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> ---
> 
> Sorry, v1 included an unintended change.
> 
> Thanks,
> 
> Tomeu
> 
> ---
>  drivers/input/keyboard/cros_ec_keyb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
> index 769f8f7..b50c5b8 100644
> --- a/drivers/input/keyboard/cros_ec_keyb.c
> +++ b/drivers/input/keyboard/cros_ec_keyb.c
> @@ -341,7 +341,7 @@ static int cros_ec_keyb_resume(struct device *dev)
>  	 * wake source (e.g. the lid is open and the user might press a key to
>  	 * wake) then the key scan buffer should be preserved.
>  	 */
> -	if (ckdev->ec->was_wake_device)
> +	if (!ckdev->ec->was_wake_device)
>  		cros_ec_keyb_clear_keyboard(ckdev);
>  

Your change matches the comment indeed and makes more sense.

Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

Best regards,
Javier

  reply	other threads:[~2015-03-25 18:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 16:08 [PATCH v2] Input: cros_ec_keyb - Clear keyboard state only when it hasn't been a wake source Tomeu Vizoso
2015-03-25 18:45 ` Javier Martinez Canillas [this message]
2015-04-06 16:47   ` 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=55130243.4000209@collabora.co.uk \
    --to=javier.martinez@collabora.co.uk \
    --cc=abrestic@chromium.org \
    --cc=dianders@chromium.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sjoerd.simons@collabora.co.uk \
    --cc=tbroch@chromium.org \
    --cc=tomeu.vizoso@collabora.com \
    --cc=wfrichar@chromium.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).