From 33f29160a0caa776a5e6e341b30d915119f84f51 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Fri, 8 Nov 2013 10:10:23 -0800 Subject: Specify I2C channels physically, not arbitrarily 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 Reviewed-on: https://chromium-review.googlesource.com/176176 Reviewed-by: Yung-chieh Lo --- board/bds/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board/bds') diff --git a/board/bds/board.c b/board/bds/board.c index e23b17c33a..90ac5eb946 100644 --- a/board/bds/board.c +++ b/board/bds/board.c @@ -34,7 +34,7 @@ BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); /* I2C ports */ const struct i2c_port_t i2c_ports[] = { - {"lightbar", I2C_PORT_LIGHTBAR, 400}, + {"lightbar", 5, 400}, }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); -- cgit v1.2.1