Skip to content

Commit 4daeb39

Browse files
gwendalcrEnric Balletbo i Serra
authored andcommitted
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
1 parent 24c6904 commit 4daeb39

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/platform/chrome/cros_ec.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,13 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
283283

284284
dev_info(dev, "Chrome EC device registered\n");
285285

286+
/*
287+
* Unlock EC that may be waiting for AP to process MKBP events.
288+
* If the AP takes to long to answer, the EC would stop sending events.
289+
*/
290+
if (ec_dev->mkbp_event_supported)
291+
cros_ec_irq_thread(0, ec_dev);
292+
286293
return 0;
287294
}
288295
EXPORT_SYMBOL(cros_ec_register);

0 commit comments

Comments
 (0)