mbox series

[00/13] platform/chrome: Kunit tests and refactor for cros_ec_query_all()

Message ID 20220606141051.285823-1-tzungbi@kernel.org (mailing list archive)
Headers show
Series platform/chrome: Kunit tests and refactor for cros_ec_query_all() | expand

Message

Tzung-Bi Shih June 6, 2022, 2:10 p.m. UTC
The 1st patch fixes compile errors when including cros_ec_commands.h.

The 2nd patch adds Kunit tests for cros_ec_query_all().  They are baseline
tests for the following refactor patches.

The 6th, 11th, and 13th patches change the behavior a bit internally.

The rest of patches are refactor.

Tzung-Bi Shih (13):
  platform/chrome: cros_ec_commands: fix compile errors
  platform/chrome: cros_ec_proto: add Kunit tests for
    cros_ec_query_all()
  platform/chrome: use macros for passthru indexes
  platform/chrome: cros_ec_proto: assign buffer size from protocol info
  platform/chrome: cros_ec_proto: remove redundant NULL check
  platform/chrome: cros_ec_proto: use cros_ec_map_error()
  platform/chrome: cros_ec_proto: separate fill_protocol_info()
  platform/chrome: cros_ec_proto: separate fill_protocol_info_legacy()
  platform/chrome: cros_ec_proto: use devm_krealloc()
  platform/chrome: cros_ec_proto: arrange
    get_host_command_version_mask()
  platform/chrome: cros_ec_proto: fix get_host_command_version_mask()
    returns
  platform/chrome: cros_ec_proto: arrange get_host_event_wake_mask()
  platform/chrome: cros_ec_proto: fix get_host_event_wake_mask() returns

 drivers/platform/chrome/Kconfig               |   6 +
 drivers/platform/chrome/Makefile              |   1 +
 drivers/platform/chrome/cros_ec.c             |   3 -
 drivers/platform/chrome/cros_ec_proto.c       | 285 +++--
 drivers/platform/chrome/cros_ec_proto_test.c  | 983 ++++++++++++++++++
 drivers/platform/chrome/cros_ec_trace.h       |   8 +-
 drivers/platform/chrome/cros_kunit_util.c     |  98 ++
 drivers/platform/chrome/cros_kunit_util.h     |  36 +
 .../linux/platform_data/cros_ec_commands.h    |   4 +-
 include/linux/platform_data/cros_ec_proto.h   |   3 +
 10 files changed, 1254 insertions(+), 173 deletions(-)
 create mode 100644 drivers/platform/chrome/cros_kunit_util.c
 create mode 100644 drivers/platform/chrome/cros_kunit_util.h


base-commit: 4319cbd4ed99003e0c981728ab1626c25be7af4a