diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2021-01-21 21:46:37 -0800 |
---|---|---|
committer | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2021-01-22 08:50:27 +0100 |
commit | 4daeb395f1754340927d8d58269593e4e3b6afcd (patch) | |
tree | 73301a11fe0b61b5c15509fbc26846ad6a3e0a13 /drivers/platform/chrome | |
parent | 24c69043be1725606e876b47d496a0f9f87d176a (diff) |
platform/chrome: cros_ec: Call interrupt bottom half at probe time
While the AP was powered off, the EC may have send messages.
If the message is not serviced within 3s, the EC stops sending message.
Unlock the EC by purging stale messages at probe time.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20210122054637.1422289-3-gwendal@chromium.org
Diffstat (limited to 'drivers/platform/chrome')
-rw-r--r-- | drivers/platform/chrome/cros_ec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c index bf76a6c49c95..fc5aa1525d13 100644 --- a/drivers/platform/chrome/cros_ec.c +++ b/drivers/platform/chrome/cros_ec.c @@ -283,6 +283,13 @@ int cros_ec_register(struct cros_ec_device *ec_dev) dev_info(dev, "Chrome EC device registered\n"); + /* + * Unlock EC that may be waiting for AP to process MKBP events. + * If the AP takes to long to answer, the EC would stop sending events. + */ + if (ec_dev->mkbp_event_supported) + cros_ec_irq_thread(0, ec_dev); + return 0; } EXPORT_SYMBOL(cros_ec_register); |