platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_query_all()
authorTzung-Bi Shih <tzungbi@kernel.org>
Thu, 9 Jun 2022 08:49:38 +0000 (08:49 +0000)
committerTzung-Bi Shih <tzungbi@kernel.org>
Fri, 10 Jun 2022 02:31:42 +0000 (02:31 +0000)
commitb99eb596efbd2aa138dad3dd5b6705b2e8c42c36
tree264679f6aba9a3e7377e7892038526535f1e5f28
parentea7f0f777d28db6e500a05836f2a9d467c7012de
platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_query_all()

cros_ec_query_all() sends multiple host commands to EC for querying
supported protocols and settings.

Add required mock for interacting with cros_ec_query_all() and Kunit
tests.

Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20220609084957.3684698-3-tzungbi@kernel.org
drivers/platform/chrome/Kconfig
drivers/platform/chrome/Makefile
drivers/platform/chrome/cros_ec_proto_test.c
drivers/platform/chrome/cros_kunit_util.c [new file with mode: 0644]
drivers/platform/chrome/cros_kunit_util.h [new file with mode: 0644]