diff options
author | Harry Cutts <hcutts@chromium.org> | 2019-06-25 11:25:52 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-26 06:34:37 +0000 |
commit | 3c0529d9bfca2fbe11bc7412600c06fa4189df52 (patch) | |
tree | 6812f07d1830575bc035b926fad65c7ecf6a75a9 /include/i2c.h | |
parent | 068b917ef17383c1cf8987d070b27fea30a72d75 (diff) | |
download | chrome-ec-3c0529d9bfca2fbe11bc7412600c06fa4189df52.tar.gz |
util/comm-i2c: upgrade to host command protocol v3
We can remove the v2 code, as any boards still using it have reached
end-of-life, with the exception of Samus's PD, which we only communicate
with via the Kernel driver, as far as I can tell. (I verified that an
`ectool` built with this change can still be used to communicate with
the Samus PD.)
BRANCH=none
BUG=none
TEST=Checked various commands (hello, version, inventory...) with
`--interface=i2c` and `comm_init_i2c` modified to hard-code the I2C
bus to use (as the board I tested with is not yet in sysfs). The
test board is using a MAX32660, so https://crrev.com/c/1716928 was
patched in for testing.
Change-Id: I1e014c6f747ce29d9bf1541be51c519af98e7f45
Signed-off-by: Harry Cutts <hcutts@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1803977
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/i2c.h')
-rw-r--r-- | include/i2c.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/i2c.h b/include/i2c.h index ed041b2876..0d9914f4d1 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -58,6 +58,12 @@ */ #define I2C_MAX_HOST_PACKET_SIZE 128 +/* The size of the header for a version 3 request packet sent over I2C. */ +#define I2C_REQUEST_HEADER_SIZE 1 + +/* The size of the header for a version 3 response packet sent over I2C. */ +#define I2C_RESPONSE_HEADER_SIZE 2 + /* * Supported I2C CLK frequencies. * TODO(crbug.com/549286): Use this enum in i2c_port_t. |