diff options
Diffstat (limited to 'zephyr/projects/corsola/src/krabby/i2c.c')
-rw-r--r-- | zephyr/projects/corsola/src/krabby/i2c.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/zephyr/projects/corsola/src/krabby/i2c.c b/zephyr/projects/corsola/src/krabby/i2c.c new file mode 100644 index 0000000000..a83af77dbd --- /dev/null +++ b/zephyr/projects/corsola/src/krabby/i2c.c @@ -0,0 +1,19 @@ +/* Copyright 2021 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "i2c/i2c.h" +#include "i2c.h" + +/* Krabby board specific i2c implementation */ + +#ifdef CONFIG_PLATFORM_EC_I2C_PASSTHRU_RESTRICTED +int board_allow_i2c_passthru(const struct i2c_cmd_desc_t *cmd_desc) +{ + return (i2c_get_device_for_port(cmd_desc->port) == + i2c_get_device_for_port(I2C_PORT_VIRTUAL_BATTERY) || + i2c_get_device_for_port(cmd_desc->port) == + i2c_get_device_for_port(I2C_PORT_EEPROM)); +} +#endif |