diff options
author | Denis Brockus <dbrockus@chromium.org> | 2019-07-23 07:01:43 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-23 22:02:03 +0000 |
commit | c7a2862144ad8ff996c232a2b1eeaef4aae70b26 (patch) | |
tree | f493bf7bddf8ec803873195f893082977112189d /chip/npcx/i2c.c | |
parent | e7ab9a9193bf1545292cfdcfd7f3d3f5352eef84 (diff) | |
download | chrome-ec-c7a2862144ad8ff996c232a2b1eeaef4aae70b26.tar.gz |
npcx: make i2c slave address uint16_t to be standard
EC code changed over to a 7-bit slave address and stored in a uint16_t
to generically be able to handle 10-bit addresses, if they are ever
needed, as well as common bit flags in the most significant bits.
This code does not use more than the 8 least significant bits but to
be EC consistent, I am making this 16 bits.
BUG=none
BRANCH=none
TEST=make buildall -j
Change-Id: Ic5f4b3500ae7b3c18380b188efbc37c01d58d7e9
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1714136
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'chip/npcx/i2c.c')
-rw-r--r-- | chip/npcx/i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/npcx/i2c.c b/chip/npcx/i2c.c index 91590c80ec..151f786fbf 100644 --- a/chip/npcx/i2c.c +++ b/chip/npcx/i2c.c @@ -84,7 +84,7 @@ struct i2c_status { uint16_t sz_txbuf; /* Size of Tx buffer in bytes */ uint16_t sz_rxbuf; /* Size of rx buffer in bytes */ uint16_t idx_buf; /* Current index of Tx/Rx buffer */ - uint8_t slave_addr_flags;/* Target slave address */ + uint16_t slave_addr_flags;/* Target slave address */ enum smb_oper_state_t oper_state;/* Smbus operation state */ enum smb_error err_code; /* Error code */ int task_waiting; /* Task waiting on controller */ |