diff options
Diffstat (limited to 'board/elm/board.c')
-rw-r--r-- | board/elm/board.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/board/elm/board.c b/board/elm/board.c index f4f1e3be2e..4e1a680659 100644 --- a/board/elm/board.c +++ b/board/elm/board.c @@ -108,9 +108,21 @@ int anx7688_passthru_allowed(const struct i2c_port_t *port, /* I2C ports */ const struct i2c_port_t i2c_ports[] = { - {"battery", I2C_PORT_BATTERY, 100, GPIO_I2C0_SCL, GPIO_I2C0_SDA}, - {"pd", I2C_PORT_PD_MCU, 1000, GPIO_I2C1_SCL, GPIO_I2C1_SDA, - anx7688_passthru_allowed} + { + .name = "battery", + .port = I2C_PORT_BATTERY, + .kbps = 100, + .scl = GPIO_I2C0_SCL, + .sda = GPIO_I2C0_SDA + }, + { + .name = "pd", + .port = I2C_PORT_PD_MCU, + .kbps = 1000, + .scl = GPIO_I2C1_SCL, + .sda = GPIO_I2C1_SDA, + .passthru_allowed = anx7688_passthru_allowed + } }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); |