From d4d8243ed7e6ab81466b74c5a812ddfe9e53b283 Mon Sep 17 00:00:00 2001 From: Keith Short Date: Thu, 18 Nov 2021 16:54:54 -0700 Subject: i2c: Use declared initializers for i2c_ports: baseboards 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 Change-Id: I463b374760ab559e5bbf3fca7dece3537756a442 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300183 Reviewed-by: Denis Brockus --- baseboard/honeybuns/baseboard.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'baseboard/honeybuns/baseboard.c') diff --git a/baseboard/honeybuns/baseboard.c b/baseboard/honeybuns/baseboard.c index df56697fbf..e7df1b6ef4 100644 --- a/baseboard/honeybuns/baseboard.c +++ b/baseboard/honeybuns/baseboard.c @@ -89,8 +89,20 @@ __maybe_unused static void board_power_sequence(int enable) /******************************************************************************/ /* I2C port map configuration */ const struct i2c_port_t i2c_ports[] = { - {"i2c1", I2C_PORT_I2C1, 400, GPIO_EC_I2C1_SCL, GPIO_EC_I2C1_SDA}, - {"i2c3", I2C_PORT_I2C3, 400, GPIO_EC_I2C3_SCL, GPIO_EC_I2C3_SDA}, + { + .name = "i2c1", + .port = I2C_PORT_I2C1, + .kbps = 400, + .scl = GPIO_EC_I2C1_SCL, + .sda = GPIO_EC_I2C1_SDA + }, + { + .name = "i2c3", + .port = I2C_PORT_I2C3, + .kbps = 400, + .scl = GPIO_EC_I2C3_SCL, + .sda = GPIO_EC_I2C3_SDA + }, }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); -- cgit v1.2.1