[<prev] [next>] [day] [month] [year] [list]
Message-ID: <504e98c1-224e-8311-cef1-328d62393643@samsung.com>
Date: Tue, 4 Feb 2020 08:32:01 +0100
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: Yicheng Li <yichengli@...gle.com>
Cc: Enric Balletbo Serra <eballetbo@...il.com>,
Yicheng Li <yichengli@...omium.org>,
LKML <linux-kernel@...r.kernel.org>,
Benson Leung <bleung@...omium.org>,
Gwendal Grignou <gwendal@...omium.org>,
Tomasz Figa <tfiga@...omium.org>,
Linux Samsung SOC <linux-samsung-soc@...r.kernel.org>
Subject: Re: [PATCH v5] platform: cros_ec: Query EC protocol version if EC
transitions between RO/RW
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
Powered by blists - more mailing lists