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:40 +0000 |
commit | 5e751370559ed41302a06c2b664c0f47f7f1bb89 (patch) | |
tree | 819fa1900ca57cfb728ff5dc211573d6b1a4ffc7 /board/pdeval-stm32f072 | |
parent | cdc4811ebe80e0e7a0edeb093dc74b9d947290bb (diff) | |
download | chrome-ec-5e751370559ed41302a06c2b664c0f47f7f1bb89.tar.gz |
i2c: Use declared initializers for i2c_ports: eval 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: Ib6f4bd684f76a34a74ddd8f476c78223b8ccf2bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300659
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'board/pdeval-stm32f072')
-rw-r--r-- | board/pdeval-stm32f072/board.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/board/pdeval-stm32f072/board.c b/board/pdeval-stm32f072/board.c index 8c62c10b79..525f14a4af 100644 --- a/board/pdeval-stm32f072/board.c +++ b/board/pdeval-stm32f072/board.c @@ -53,7 +53,13 @@ void board_reset_pd_mcu(void) /* I2C ports */ const struct i2c_port_t i2c_ports[] = { - {"tcpc", I2C_PORT_TCPC, 400 /* kHz */, GPIO_I2C0_SCL, GPIO_I2C0_SDA} + { + .name = "tcpc", + .port = I2C_PORT_TCPC, + .kbps = 400 /* kHz */, + .scl = GPIO_I2C0_SCL, + .sda = GPIO_I2C0_SDA + } }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); |