0001
0002
0003 #ifndef __USB_TYPEC_ALTMODE_H__
0004 #define __USB_TYPEC_ALTMODE_H__
0005
0006 #include <linux/usb/typec_altmode.h>
0007
0008 struct bus_type;
0009 struct typec_mux;
0010
0011 struct altmode {
0012 unsigned int id;
0013 struct typec_altmode adev;
0014 struct typec_mux *mux;
0015
0016 enum typec_port_data roles;
0017
0018 struct attribute *attrs[5];
0019 char group_name[8];
0020 struct attribute_group group;
0021 const struct attribute_group *groups[2];
0022
0023 struct altmode *partner;
0024 struct altmode *plug[2];
0025 };
0026
0027 #define to_altmode(d) container_of(d, struct altmode, adev)
0028
0029 extern struct bus_type typec_bus;
0030 extern const struct device_type typec_altmode_dev_type;
0031
0032 #define is_typec_altmode(_dev_) (_dev_->type == &typec_altmode_dev_type)
0033
0034 #endif