Skip to content

Commit 0944ea0

Browse files
Evan BennEnric Balletbo i Serra
authored andcommitted
platform/chrome: cros_ec_proto: Use EC_HOST_EVENT_MASK not BIT
The host_event_code enum is 1-based, use EC_HOST_EVENT_MASK not BIT to generate the intended mask. This patch changes the behaviour of the mask, a following patch will restore the intended behaviour: 'Add LID and BATTERY to default mask' Fixes: c214e56 ("platform/chrome: cros_ec_proto: ignore unnecessary wakeups on old ECs") Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20201209220306.1.I6133572c0ab3c6b95426f804bac2d3833e24acb1@changeid
1 parent 8553a97 commit 0944ea0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/platform/chrome/cros_ec_proto.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -526,11 +526,11 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev)
526526
* power), not wake up.
527527
*/
528528
ec_dev->host_event_wake_mask = U32_MAX &
529-
~(BIT(EC_HOST_EVENT_AC_DISCONNECTED) |
530-
BIT(EC_HOST_EVENT_BATTERY_LOW) |
531-
BIT(EC_HOST_EVENT_BATTERY_CRITICAL) |
532-
BIT(EC_HOST_EVENT_PD_MCU) |
533-
BIT(EC_HOST_EVENT_BATTERY_STATUS));
529+
~(EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) |
530+
EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_LOW) |
531+
EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_CRITICAL) |
532+
EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU) |
533+
EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_STATUS));
534534
/*
535535
* Old ECs may not support this command. Complain about all
536536
* other errors.

0 commit comments

Comments
 (0)