From eebfdd14859dbeaa464c9bdcfa6b6c67a5289353 Mon Sep 17 00:00:00 2001 From: Keith Short Date: Fri, 19 Nov 2021 15:42:27 -0700 Subject: 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 Change-Id: If7d578dc2bc5ef1f7c5dc424ceb3193cd98f7a69 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300663 Reviewed-by: Edward Hill --- board/makomo/board.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'board/makomo') 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); -- cgit v1.2.1