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

#include <zephyr/devicetree.h>
#include "driver/tcpm/ps8xxx_public.h"

#define PS8XXX_COMPAT parade_ps8xxx

#define TCPC_CONFIG_PS8XXX(id)                                                \
	{                                                                     \
		.bus_type = EC_BUS_TYPE_I2C,                                  \
		.i2c_info = {                                                 \
			.port = I2C_PORT(DT_PHANDLE(id, port)),               \
			.addr_flags = DT_STRING_UPPER_TOKEN(                  \
					id, i2c_addr_flags),                  \
		},                                                            \
		.drv = &ps8xxx_tcpm_drv,                                      \
		.flags = DT_PROP(id, tcpc_flags),                             \
	},