diff options
author | Bill Richardson <wfrichar@chromium.org> | 2013-11-08 10:10:23 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-11-11 23:47:05 +0000 |
commit | 33f29160a0caa776a5e6e341b30d915119f84f51 (patch) | |
tree | e512362fc4d59639e8fca9991dd82ec57aab6ac5 /board/rambi | |
parent | eb70d3cda72b3c1bb00fe24d4386288c2d4b114d (diff) | |
download | chrome-ec-33f29160a0caa776a5e6e341b30d915119f84f51.tar.gz |
Specify I2C channels physically, not arbitrarilytest-4824.B
In board.c, we initialize this struct:
struct i2c_port_t {
const char *name; /* Port name */
int port; /* Port */
int kbps; /* Speed in kbps */
};
extern const struct i2c_port_t i2c_ports[];
The port field refers to the physical I2C bus on the EC.
Meanwhile, in board.h, we've identified the bus where each I2C device is
attached:
Up until this CL, we've been picking one of those device-to-bus macros to
initialize port fields of the i2c_ports[] array. That's wrong and confusing.
This change specifies the physical channel with the physical number.
BUG=chrome-os-partner:18343
BRANCH=none
TEST=manual
Renaming only. There should be no change in observed behavior.
Change-Id: I5427c26290572133f060b6cf0d9ebea5015adba1
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/176176
Reviewed-by: Yung-chieh Lo <yjlou@chromium.org>
Diffstat (limited to 'board/rambi')
-rw-r--r-- | board/rambi/board.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/board/rambi/board.c b/board/rambi/board.c index d20229ec5c..b1856b0d3a 100644 --- a/board/rambi/board.c +++ b/board/rambi/board.c @@ -173,10 +173,8 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); /* I2C ports */ const struct i2c_port_t i2c_ports[] = { - /* Note: battery and charger share a port. Only include it once in - * this list so we don't double-initialize it. */ - {"batt_chg", I2C_PORT_BATTERY, 100}, - {"thermal", I2C_PORT_THERMAL, 100}, + {"batt_chg", 0, 100}, + {"thermal", 5, 100}, }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); |