linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: RaviChandra Sadineni <ravisadineni@chromium.org>,
	dmitry.torokhov@gmail.com, ravisadineni@google.com,
	dtor@google.com, linux-samsung-soc@vger.kernel.org,
	tbroch@google.com, linux-kernel@vger.kernel.org,
	linux-input@vger.kernel.org, tfiga@chromium.org
Subject: Re: Input: cros_ec_keyb: Remove check before calling pm_wakeup_event.
Date: Mon, 20 Aug 2018 10:52:41 +0200	[thread overview]
Message-ID: <20180820085242eucas1p23f693665452400f3a57676393ce08939~Mi7BqhC1Y0964309643eucas1p2V@eucas1p2.samsung.com> (raw)
In-Reply-To: <20180817212135.222689-1-ravisadineni@chromium.org>

Hi Ravi,

On 2018-08-17 23:21, RaviChandra Sadineni wrote:
> From: RaviChandra Sadineni <ravisadineni@google.com>
>
> hi Merek,
>
> Unfortunately I could not get the device to boot even after using the exynos_defconfig.
> Can you please try this patch and see if this fixes the issue. If not can you enable the
> debug logs and send me the logs.
>
>
> Currently on every resume we check for mkbp events and notify the
> clients. This helps in identifying the wakeup sources. But on devices
> that do not support mkbp protocol, we might end up getting key state of
> the keyboard in a loop and block the resume. Instead check for events only
> if  mkbp is supported.
>
> Signed-off-by: RaviChandra Sadineni <ravisadineni@chromium.org>

This patch fixes the suspend/resume issue on Snow and Peach-Pit
Chromebooks, both on vanilla v4.18 as well as linux-next from 20 August 
2018.

Thanks!

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>

A small hint: to merge it please resend with proper subject and put the note
should be after '---' mark, so it will be dropped by the 'git am' command.

> ---
>   drivers/mfd/cros_ec.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c
> index 65a9757a6d21..fe6f83766144 100644
> --- a/drivers/mfd/cros_ec.c
> +++ b/drivers/mfd/cros_ec.c
> @@ -218,7 +218,8 @@ EXPORT_SYMBOL(cros_ec_suspend);
>   
>   static void cros_ec_report_events_during_suspend(struct cros_ec_device *ec_dev)
>   {
> -	while (cros_ec_get_next_event(ec_dev, NULL) > 0)
> +	while (ec_dev->mkbp_event_supported &&
> +	       cros_ec_get_next_event(ec_dev, NULL) > 0)
>   		blocking_notifier_call_chain(&ec_dev->event_notifier,
>   					     1, ec_dev);
>   }

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


      reply	other threads:[~2018-08-20  8:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05 22:44 [PATCH] Input: cros_ec_keyb: Remove check before calling pm_wakeup_event Ravi Chandra Sadineni
2018-06-12 23:32 ` Dmitry Torokhov
     [not found] ` <CGME20180803072628eucas1p26abe0cb121b974401759502f8807bb96@eucas1p2.samsung.com>
2018-08-03  7:26   ` Marek Szyprowski
     [not found]     ` <CAEZbON7qLheHFuU6zwArCz=CG03JvnFjcehBGjE4RqROYrMLhQ@mail.gmail.com>
2018-08-03 16:07       ` Dmitry Torokhov
     [not found]         ` <CAEZbON4O0X8Fo6eAbmPOSiB1_Tw7x+Ox3ROoGfZQn72uQGQLkg@mail.gmail.com>
2018-08-06  5:29           ` Marek Szyprowski
2018-08-06  6:16             ` Dmitry Torokhov
2018-08-06  7:15               ` Marek Szyprowski
2018-08-06 23:05                 ` Ravi Chandra Sadineni
2018-08-07 21:59                   ` Ravi Chandra Sadineni
2018-08-08  5:03                     ` Marek Szyprowski
     [not found]                     ` <85a59afc-9dc0-b9fb-7e8f-32731337884c@samsung.com>
2018-08-10  8:23                       ` Marek Szyprowski
2018-08-17 21:21                         ` RaviChandra Sadineni
2018-08-20  8:52                           ` Marek Szyprowski [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='20180820085242eucas1p23f693665452400f3a57676393ce08939~Mi7BqhC1Y0964309643eucas1p2V@eucas1p2.samsung.com' \
    --to=m.szyprowski@samsung.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dtor@google.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=ravisadineni@chromium.org \
    --cc=ravisadineni@google.com \
    --cc=tbroch@google.com \
    --cc=tfiga@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).