diff options
author | Denis Brockus <dbrockus@chromium.org> | 2019-07-23 07:01:43 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-23 00:12:34 +0000 |
commit | 025d2bdcd4d9f742956ac538200a2ac9deb3f410 (patch) | |
tree | a414e7e284485686769f24494ff17c722ad88304 | |
parent | 6d39786d6a22fc355cd4d7eea384d254819c6a38 (diff) | |
download | chrome-ec-025d2bdcd4d9f742956ac538200a2ac9deb3f410.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>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1767529
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
Tested-by: Edward Hill <ecgh@chromium.org>
-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 1acb51b75b..22471e14ad 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 */ |