summaryrefslogtreecommitdiff
path: root/board/coffeecake
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:59 +0000
commit23a975d12e3453aac4e9a15048ba43a8989d3073 (patch)
treef0162d7118edfe154f283a4e2206f130ebd21bab /board/coffeecake
parent508e74c84334bc3d2118c7f333320a4f7292ea6f (diff)
downloadchrome-ec-23a975d12e3453aac4e9a15048ba43a8989d3073.tar.gz
i2c: Use declared initializers for i2c_ports: boards a-l
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: Ibced584424f1f64718fb55cec0c972dc939bec5c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300661 Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'board/coffeecake')
-rw-r--r--board/coffeecake/board.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/board/coffeecake/board.c b/board/coffeecake/board.c
index 2939a65125..b344a5f745 100644
--- a/board/coffeecake/board.c
+++ b/board/coffeecake/board.c
@@ -31,7 +31,13 @@ void vbus_event(enum gpio_signal signal);
/* I2C ports */
const struct i2c_port_t i2c_ports[] = {
- {"charger", I2C_PORT_SY21612, 400, GPIO_I2C0_SCL, GPIO_I2C0_SDA},
+ {
+ .name = "charger",
+ .port = I2C_PORT_SY21612,
+ .kbps = 400,
+ .scl = GPIO_I2C0_SCL,
+ .sda = GPIO_I2C0_SDA
+ },
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);