summaryrefslogtreecommitdiff
path: root/zephyr/shim/include/usbc/tcpc_anx7447.h
blob: f8abb3760ec4b2dbae2eba6bdd0677b4781b7e1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Copyright 2022 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "tcpm/anx7447_public.h"

#include <zephyr/devicetree.h>

#define ANX7447_TCPC_COMPAT analogix_anx7447_tcpc

/* clang-format off */
#define TCPC_CONFIG_ANX7447(id)                                                \
	{                                                                      \
		.bus_type = EC_BUS_TYPE_I2C,                                   \
		.i2c_info = {                                                  \
			.port = I2C_PORT_BY_DEV(id),                           \
			.addr_flags = DT_REG_ADDR(id),                         \
		},                                                             \
		.drv = &anx7447_tcpm_drv,                                      \
		.flags = DT_PROP(id, tcpc_flags),                              \
		.irq_gpio = GPIO_DT_SPEC_GET_OR(id, irq_gpios, {}),            \
	}
/* clang-format on */