diff options
author | Keith Short <keithshort@chromium.org> | 2021-11-18 16:54:54 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-11-30 23:55:50 +0000 |
commit | 508e74c84334bc3d2118c7f333320a4f7292ea6f (patch) | |
tree | 621926c55b7f090191f6e276f4c84419cd84d9cb /board/servo_v4p1/board.c | |
parent | 5e751370559ed41302a06c2b664c0f47f7f1bb89 (diff) | |
download | chrome-ec-508e74c84334bc3d2118c7f333320a4f7292ea6f.tar.gz |
i2c: Use declared initializers for i2c_ports: servo 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: I7eb605c0a87fad9b803955fa6ae34d39d71ad27a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300660
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Diffstat (limited to 'board/servo_v4p1/board.c')
-rw-r--r-- | board/servo_v4p1/board.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/board/servo_v4p1/board.c b/board/servo_v4p1/board.c index 385d46ef55..3284b4ef58 100644 --- a/board/servo_v4p1/board.c +++ b/board/servo_v4p1/board.c @@ -401,8 +401,13 @@ BUILD_ASSERT(ARRAY_SIZE(usb_strings) == USB_STR_COUNT); /* I2C ports */ const struct i2c_port_t i2c_ports[] = { - {"master", I2C_PORT_MASTER, 100, - GPIO_MASTER_I2C_SCL, GPIO_MASTER_I2C_SDA}, + { + .name = "master", + .port = I2C_PORT_MASTER, + .kbps = 100, + .scl = GPIO_MASTER_I2C_SCL, + .sda = GPIO_MASTER_I2C_SDA + }, }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); |