提交 852405d8 编写于 作者: E Evan Benn 提交者: Enric Balletbo i Serra

platform/chrome: cros_ec_proto: Add LID and BATTERY to default mask

After 'platform/chrome: cros_ec_proto: Use EC_HOST_EVENT_MASK not BIT'
some of the flags are not quite correct.
LID_CLOSED is used to suspend the device, so it makes sense to ignore that.
BATTERY events are also frequent and causing spurious wakes on elm/hana
mt8173 devices.

Fixes: c214e564 ("platform/chrome: cros_ec_proto: ignore unnecessary wakeups on old ECs")
Signed-off-by: NEvan Benn <evanbenn@chromium.org>
Reviewed-by: NBrian Norris <briannorris@chromium.org>
Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20201209220306.2.I3291bf83e4884c206b097ede34780e014fa3e265@changeid
上级 0944ea07
...@@ -526,9 +526,11 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev) ...@@ -526,9 +526,11 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev)
* power), not wake up. * power), not wake up.
*/ */
ec_dev->host_event_wake_mask = U32_MAX & ec_dev->host_event_wake_mask = U32_MAX &
~(EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) | ~(EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) |
EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) |
EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_LOW) | EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_LOW) |
EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_CRITICAL) | EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_CRITICAL) |
EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY) |
EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU) | EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU) |
EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_STATUS)); EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_STATUS));
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册