0001
0002
0003 #ifndef __USB_TYPEC_MUX__
0004 #define __USB_TYPEC_MUX__
0005
0006 #include <linux/usb/typec_mux.h>
0007
0008 struct typec_switch_dev {
0009 struct device dev;
0010 typec_switch_set_fn_t set;
0011 };
0012
0013 struct typec_mux_dev {
0014 struct device dev;
0015 typec_mux_set_fn_t set;
0016 };
0017
0018 #define to_typec_switch_dev(_dev_) container_of(_dev_, struct typec_switch_dev, dev)
0019 #define to_typec_mux_dev(_dev_) container_of(_dev_, struct typec_mux_dev, dev)
0020
0021 extern const struct device_type typec_switch_dev_type;
0022 extern const struct device_type typec_mux_dev_type;
0023
0024 #define is_typec_switch_dev(dev) ((dev)->type == &typec_switch_dev_type)
0025 #define is_typec_mux_dev(dev) ((dev)->type == &typec_mux_dev_type)
0026
0027 #endif