2018-06-27 15:19:50 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
|
|
|
|
#ifndef __USB_TYPEC_ALTMODE_H__
|
|
|
|
#define __USB_TYPEC_ALTMODE_H__
|
|
|
|
|
|
|
|
#include <linux/usb/typec_altmode.h>
|
|
|
|
|
|
|
|
struct bus_type;
|
2021-04-01 10:58:42 +00:00
|
|
|
struct typec_mux;
|
2018-06-27 15:19:50 +00:00
|
|
|
|
|
|
|
struct altmode {
|
|
|
|
unsigned int id;
|
|
|
|
struct typec_altmode adev;
|
|
|
|
struct typec_mux *mux;
|
|
|
|
|
|
|
|
enum typec_port_data roles;
|
|
|
|
|
|
|
|
struct attribute *attrs[5];
|
2018-07-06 13:28:32 +00:00
|
|
|
char group_name[8];
|
2018-06-27 15:19:50 +00:00
|
|
|
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)
|
|
|
|
|
|
|
|
extern struct bus_type typec_bus;
|
|
|
|
extern const struct device_type typec_altmode_dev_type;
|
|
|
|
|
|
|
|
#define is_typec_altmode(_dev_) (_dev_->type == &typec_altmode_dev_type)
|
2019-05-31 14:15:41 +00:00
|
|
|
|
2018-06-27 15:19:50 +00:00
|
|
|
#endif /* __USB_TYPEC_ALTMODE_H__ */
|