summaryrefslogtreecommitdiff
path: root/board/makomo
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-11-19 15:42:27 -0700
committerCommit Bot <commit-bot@chromium.org>2021-11-30 23:56:13 +0000
commiteebfdd14859dbeaa464c9bdcfa6b6c67a5289353 (patch)
tree42aabe3a784dad83113b9117f047b091dafeff5c /board/makomo
parent262172c84b5d4a1688a9df806b3ec42ab40fb4a9 (diff)
downloadchrome-ec-eebfdd14859dbeaa464c9bdcfa6b6c67a5289353.tar.gz
i2c: Use declared initializers for bitbang ports
Convert all instances of i2c_bitbang_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: If7d578dc2bc5ef1f7c5dc424ceb3193cd98f7a69 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300663 Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'board/makomo')
-rw-r--r--board/makomo/board.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/board/makomo/board.c b/board/makomo/board.c
index d248a2a667..8f9dbdc12c 100644
--- a/board/makomo/board.c
+++ b/board/makomo/board.c
@@ -84,7 +84,14 @@ const struct i2c_port_t i2c_ports[] = {
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
const struct i2c_port_t i2c_bitbang_ports[] = {
- {"battery", 2, 100, GPIO_I2C3_SCL, GPIO_I2C3_SDA, .drv = &bitbang_drv},
+ {
+ .name = "battery",
+ .port = 2,
+ .kbps = 100,
+ .scl = GPIO_I2C3_SCL,
+ .sda = GPIO_I2C3_SDA,
+ .drv = &bitbang_drv
+ },
};
const unsigned int i2c_bitbang_ports_used = ARRAY_SIZE(i2c_bitbang_ports);