diff options
author | Simon Glass <sjg@chromium.org> | 2012-07-15 03:03:55 +0100 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-07-22 00:36:39 -0700 |
commit | bff14cac0b17217a6be02924d109e58b3aaa50b1 (patch) | |
tree | 68e9d5b19f7a080a3fe420535124dbd85044840d /common/temp_sensor.c | |
parent | 37a6387fa906e43115417c4a89069be043e2c554 (diff) | |
download | chrome-ec-bff14cac0b17217a6be02924d109e58b3aaa50b1.tar.gz |
i2c: Support command version numbers
Currently, I2C commands look like this:
Input:
cmd8 [params bytes] checksum
Output:
response8 [response_ptr bytes] checksum
Use a prefix byte of (0xDC + cmd_version) to indicate the command
version. This is compatible with the existing protocol, since there
are no host commands in the range 0xDC-0xFB. If the first byte of
the from-host data is 0x00-0xDB, it's a version 0 command.
There is no change to the output format, since the EC needs to hand
back a response which matches the version requested by the host.
New input:
(0xDC+ver8) cmd8 paramlen8 [params bytes] checksum
New output:
response8 responselen8 [response_ptr bytes] checksum
If the host gets a response of EC_RES_INVALID_COMMAND, it knows it's
talking to an old EC, and at most version 0 of the command is supported.
BUG=chrome-os-partner:11317
TEST=manual and a bit ad-hoc:
(note, this testing is not completed yet, so far only snow is tested)
Check that snow and link still process commands correctly over I2C
from U-Boot.
SMDK5250 # mkbp test
Old interface:
New interface:
Test passed
Change-Id: I1c21f2b036091e9122b4f980ca5f5af34f7fc070
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27470
Diffstat (limited to 'common/temp_sensor.c')
0 files changed, 0 insertions, 0 deletions