summaryrefslogtreecommitdiff
path: root/drivers/usb/typec/bus.h
blob: 7df5deb1dd3a5740b1dd35ad247b05f737d0d21b (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
25
26
27
28
29
30
/* SPDX-License-Identifier: GPL-2.0 */

#ifndef __USB_TYPEC_ALTMODE_H__
#define __USB_TYPEC_ALTMODE_H__

#include <linux/usb/typec_altmode.h>

struct typec_mux;
struct typec_retimer;

struct altmode {
	unsigned int			id;
	struct typec_altmode		adev;
	struct typec_mux		*mux;
	struct typec_retimer		*retimer;

	enum typec_port_data		roles;

	struct attribute		*attrs[5];
	char				group_name[8];
	struct attribute_group		group;
	const struct attribute_group	*groups[2];

	struct altmode			*partner;
	struct altmode			*plug[2];
};

#define to_altmode(d) container_of(d, struct altmode, adev)

#endif /* __USB_TYPEC_ALTMODE_H__ */