platform/chrome: cros_ec: Notify the PM of wake events during resume
authorJameson Thies <jthies@google.com>
Tue, 13 Sep 2022 20:49:54 +0000 (20:49 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:35:40 +0000 (12:35 +0200)
commit39da49ffa2f3d0b077ce3c056f9998d62a086d63
tree6372d06b922ac63f2134c4a4fad92cffacf5945c
parent74636047845cd2c91ad3baec60e506315a760bb0
platform/chrome: cros_ec: Notify the PM of wake events during resume

[ Upstream commit 8edd2752b0aa498b3a61f3caee8f79f7e0567fad ]

cros_ec_handle_event in the cros_ec driver can notify the PM of wake
events. When a device is suspended, cros_ec_handle_event will not check
MKBP events. Instead, received MKBP events are checked during resume by
cros_ec_report_events_during_suspend. But
cros_ec_report_events_during_suspend cannot notify the PM if received
events are wake events, causing wake events to not be reported if
received while the device is suspended.

Update cros_ec_report_events_during_suspend to notify the PM of wake
events during resume by calling pm_wakeup_event.

Signed-off-by: Jameson Thies <jthies@google.com>
Reviewed-by: Prashant Malani <pmalani@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20220913204954.2931042-1-jthies@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/chrome/cros_ec.c