From 7bbed26ca931226e507ba496e64cae6692d15607 Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Mon, 25 Feb 2019 13:56:43 -0800 Subject: ec/google/chromeec: Clarify return value of google_chromeec_command This patch clarifies the definition of google_chromeec_command. Currently absence of the definition isn't causing any problem because wrapper APIs check 'ret != 0' or wrapper APIs check 'ret < 0' for an interface which returns only negative error codes. However, there is a chance that a new wrapper API will be addedl which check 'ret < 0' to catch errors, assuming other interfaces behave the same. Or existing wrapper APIs will be broken as soon as they're compiled for another interface. BUG=chromium:935038 TEST=none Signed-off-by: Daisuke Nojiri Change-Id: I2ce7109b5f2a1d5294f167719730bc1f039ba03f Reviewed-on: https://review.coreboot.org/c/31613 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/ec/google/chromeec/ec.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ec') diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h index 70b2b525b5..7a383364a2 100644 --- a/src/ec/google/chromeec/ec.h +++ b/src/ec/google/chromeec/ec.h @@ -155,6 +155,12 @@ typedef int (*crosec_io_t)(size_t req_size, size_t resp_size, void *context); int crosec_command_proto(struct chromeec_command *cec_command, crosec_io_t crosec_io, void *context); +/** + * Send a command to a CrOS EC + * + * @param cec_command: CrOS EC command to send + * @return 0 for success. Non-zero for error. + */ int google_chromeec_command(struct chromeec_command *cec_command); struct google_chromeec_event_info { -- cgit v1.2.3