summaryrefslogtreecommitdiff
path: root/board/willow
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-11-18 16:54:54 -0700
committerCommit Bot <commit-bot@chromium.org>2021-11-30 23:55:25 +0000
commit793adf40240c93b49ab87dd04e94ab37ce594f3f (patch)
treed77be04cefc75cee43ffc520e3a83ecb360a8d3d /board/willow
parentd392e5dd56d59c8ce2c8f4423d8a4c2c81d0bddb (diff)
downloadchrome-ec-793adf40240c93b49ab87dd04e94ab37ce594f3f.tar.gz
i2c: Use declared initializers for i2c_ports: kukui boards
Convert all instances of i2c_ports[] to use declared initializers. This allows the fields to be reordered without breaking code. BUG=none BRANCH=none TEST=compare_build.sh Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I326bd6efef5cdfdf8bbd2c68dda268dca543b9d2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300185 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'board/willow')
-rw-r--r--board/willow/board.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/board/willow/board.c b/board/willow/board.c
index ba467fddc2..169173c143 100644
--- a/board/willow/board.c
+++ b/board/willow/board.c
@@ -64,8 +64,20 @@ BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT);
/******************************************************************************/
/* I2C ports */
const struct i2c_port_t i2c_ports[] = {
- {"typec", 0, 400, GPIO_I2C1_SCL, GPIO_I2C1_SDA},
- {"other", 1, 400, GPIO_I2C2_SCL, GPIO_I2C2_SDA},
+ {
+ .name = "typec",
+ .port = 0,
+ .kbps = 400,
+ .scl = GPIO_I2C1_SCL,
+ .sda = GPIO_I2C1_SDA
+ },
+ {
+ .name = "other",
+ .port = 1,
+ .kbps = 400,
+ .scl = GPIO_I2C2_SCL,
+ .sda = GPIO_I2C2_SDA
+ },
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);