lkml.org 
[lkml]   [2021]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 2/2] platform: cros_ec: Call interrupt bottom half at probe time
Date
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>
---
Changes since v1: None.

drivers/platform/chrome/cros_ec.c | 7 +++++++
1 file changed, 7 insertions(+)

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);
--
2.30.0.280.ga3ce27912f-goog
\
 
 \ /
  Last update: 2021-01-22 06:48    [W:0.054 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site