linux/drivers/usb/typec/class.h

/* SPDX-License-Identifier: GPL-2.0 */

#ifndef __USB_TYPEC_CLASS__
#define __USB_TYPEC_CLASS__

#include <linux/device.h>
#include <linux/usb/typec.h>

struct typec_mux;
struct typec_switch;
struct usb_device;

struct typec_plug {};

struct typec_cable {};

struct typec_partner {};

struct typec_port {};

#define to_typec_port(_dev_)
#define to_typec_plug(_dev_)
#define to_typec_cable(_dev_)
#define to_typec_partner(_dev_)

extern const struct device_type typec_partner_dev_type;
extern const struct device_type typec_cable_dev_type;
extern const struct device_type typec_plug_dev_type;
extern const struct device_type typec_port_dev_type;

#define is_typec_partner(dev)
#define is_typec_cable(dev)
#define is_typec_plug(dev)
#define is_typec_port(dev)

extern const struct class typec_mux_class;
extern const struct class retimer_class;
extern const struct class typec_class;

#if defined(CONFIG_ACPI)
int typec_link_ports(struct typec_port *connector);
void typec_unlink_ports(struct typec_port *connector);
#else
static inline int typec_link_ports(struct typec_port *connector) { return 0; }
static inline void typec_unlink_ports(struct typec_port *connector) { }
#endif

#endif /* __USB_TYPEC_CLASS__ */