mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Yicheng Li <yichengli@google.com>
Cc: Enric Balletbo Serra <eballetbo@gmail.com>,
	Yicheng Li <yichengli@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Benson Leung <bleung@chromium.org>,
	Gwendal Grignou <gwendal@chromium.org>,
	Tomasz Figa <tfiga@chromium.org>,
	Linux Samsung SOC <linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH v5] platform: cros_ec: Query EC protocol version if EC transitions between RO/RW
Date: Tue, 4 Feb 2020 08:32:01 +0100	[thread overview]
Message-ID: <504e98c1-224e-8311-cef1-328d62393643@samsung.com> (raw)
In-Reply-To: <CAB8_tbG-9ntKe3NoMfiDEZsYqbM4U5mK24JNHeikzxG9bkuvGg@mail.gmail.com>

Hi

On 04.02.2020 00:00, Yicheng Li wrote:
> Hi Enric and Marek,
>
> Those Samsung Chromebooks (Snow, Peach-Pit and Peach-Pi) do not 
> support mkbp events, thus we should not do this "ready event handling" 
> for them.
> Below is my fix, I also sent the entire thing as a v6 in a separate 
> email. Thanks!
>
> diff --git a/drivers/platform/chrome/cros_ec.c 
> b/drivers/platform/chrome/cros_ec.c
> index 38ec1fb409a5..f16804db805b 100644
> --- a/drivers/platform/chrome/cros_ec.c
> +++ b/drivers/platform/chrome/cros_ec.c
> @@ -218,12 +218,17 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
>                 dev_dbg(ec_dev->dev, "Error %d clearing sleep event to 
> ec",
>                         err);
>
> -       /* Register the notifier for EC_HOST_EVENT_INTERFACE_READY 
> event. */
> -       ec_dev->notifier_ready.notifier_call = cros_ec_ready_event;
> -       err = blocking_notifier_chain_register(&ec_dev->event_notifier,
> -  &ec_dev->notifier_ready);
> -       if (err)
> -               return err;
> +       if (ec_dev->mkbp_event_supported) {
> +               /*
> +                * Register the notifier for EC_HOST_EVENT_INTERFACE_READY
> +                * event.
> +                */
> +               ec_dev->notifier_ready.notifier_call = 
> cros_ec_ready_event;
> +               err = blocking_notifier_chain_register(
> +                       &ec_dev->event_notifier, &ec_dev->notifier_ready);
> +               if (err)
> +                       return err;
> +       }
>
>         dev_info(dev, "Chrome EC device registered\n");
>
I confirm that this patch fixes the issue on Samsung Exynos-based 
Chromebooks (Snow, Peach-Pit and Peach-Pi).

 > ...

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


      parent reply	other threads:[~2020-02-04  7:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 22:06 Yicheng Li
2020-01-23 21:04 ` Enric Balletbo Serra
     [not found] ` <CGME20200131073925eucas1p25bde5452aaa821435367dbfa9904a476@eucas1p2.samsung.com>
2020-01-31  7:39   ` Marek Szyprowski
2020-02-03  9:33     ` Enric Balletbo Serra
2020-02-03 12:18       ` Marek Szyprowski
     [not found]         ` <CAB8_tbG-9ntKe3NoMfiDEZsYqbM4U5mK24JNHeikzxG9bkuvGg@mail.gmail.com>
2020-02-04  7:32           ` 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=504e98c1-224e-8311-cef1-328d62393643@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=bleung@chromium.org \
    --cc=eballetbo@gmail.com \
    --cc=gwendal@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tfiga@chromium.org \
    --cc=yichengli@chromium.org \
    --cc=yichengli@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

all inboxes | Powered by JetHome®