| 1 |
/* SPDX-License-Identifier: GPL-2.0 */ |
| 2 |
|
| 3 |
#ifndef __USB_TYPEC_ALTMODE_H__ |
| 4 |
#define __USB_TYPEC_ALTMODE_H__ |
| 5 |
|
| 6 |
#include <linux/usb/typec_altmode.h> |
| 7 |
|
| 8 |
struct typec_mux; |
| 9 |
struct typec_retimer; |
| 10 |
|
| 11 |
struct altmode { |
| 12 |
unsigned int id; |
| 13 |
struct typec_altmode adev; |
| 14 |
struct typec_mux *mux; |
| 15 |
struct typec_retimer *retimer; |
| 16 |
|
| 17 |
enum typec_port_data roles; |
| 18 |
|
| 19 |
struct attribute *attrs[5]; |
| 20 |
char group_name[8]; |
| 21 |
struct attribute_group group; |
| 22 |
const struct attribute_group *groups[2]; |
| 23 |
|
| 24 |
struct altmode *partner; |
| 25 |
struct altmode *plug[2]; |
| 26 |
}; |
| 27 |
|
| 28 |
#define to_altmode(d) container_of(d, struct altmode, adev) |
| 29 |
|
| 30 |
#endif /* __USB_TYPEC_ALTMODE_H__ */ |