summaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2019-02-25 13:56:43 -0800
committerPatrick Georgi <pgeorgi@google.com>2019-02-26 11:19:14 +0000
commit7bbed26ca931226e507ba496e64cae6692d15607 (patch)
tree1770d56c9df07556fc17c5e9faf435d4658317aa /src/ec
parent967edec25463fada1634e8ccee0e847ae49141e2 (diff)
downloadcoreboot-7bbed26ca931226e507ba496e64cae6692d15607.tar.xz
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 <dnojiri@chromium.org> Change-Id: I2ce7109b5f2a1d5294f167719730bc1f039ba03f Reviewed-on: https://review.coreboot.org/c/31613 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/google/chromeec/ec.h6
1 files changed, 6 insertions, 0 deletions
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 {