diff options
Diffstat (limited to 'zephyr/shim/include/usbc/tcpc_rt1718s_emul.h')
-rw-r--r-- | zephyr/shim/include/usbc/tcpc_rt1718s_emul.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/zephyr/shim/include/usbc/tcpc_rt1718s_emul.h b/zephyr/shim/include/usbc/tcpc_rt1718s_emul.h new file mode 100644 index 0000000000..0d9a95cbea --- /dev/null +++ b/zephyr/shim/include/usbc/tcpc_rt1718s_emul.h @@ -0,0 +1,28 @@ +/* Copyright 2023 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __ZEPHYR_SHIM_TCPC_RT1718S_EMUL_H +#define __ZEPHYR_SHIM_TCPC_RT1718S_EMUL_H + +#include "driver/tcpm/rt1718s_public.h" + +#include <zephyr/devicetree.h> + +#define RT1718S_EMUL_COMPAT cros_rt1718s_tcpc_emul + +/* clang-format off */ +#define TCPC_CONFIG_RT1718S_EMUL(id) \ + { \ + .bus_type = EC_BUS_TYPE_I2C, \ + .i2c_info = { \ + .port = I2C_PORT_BY_DEV(id), \ + .addr_flags = DT_REG_ADDR(id), \ + }, \ + .drv = &rt1718s_tcpm_drv, \ + .irq_gpio = GPIO_DT_SPEC_GET_OR(id, irq_gpios, {}), \ + } +/* clang-format on */ + +#endif /* __ZEPHYR_SHIM_TPCP_RT1718S_EMUL_H */ |