platform/chrome: cros_ec_proto: add Kunit tests for get_host_event
authorTzung-Bi Shih <tzungbi@kernel.org>
Wed, 22 Jun 2022 04:10:37 +0000 (04:10 +0000)
committerTzung-Bi Shih <tzungbi@kernel.org>
Wed, 20 Jul 2022 01:22:59 +0000 (01:22 +0000)
commit7cb1eb82642becd668665689c6eac2a639a81e1b
treef0c49563ca0ea235e1c3689d1f1f737b55d3299f
parent2b7ed927953f30eaae0e622c670dcddce3bd3aa4
platform/chrome: cros_ec_proto: add Kunit tests for get_host_event

cros_ec_get_host_event() performs some sanity checks, parses
`ec_dev->event_data.data.host_event`, and returns bitmap of
EC_HOST_EVENT_*.

Add Kunit tests for cros_ec_get_host_event().

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20220622041040.202737-5-tzungbi@kernel.org
drivers/platform/chrome/cros_ec_proto_test.c