1 /* SPDX-License-Identifier: GPL-2.0 */ 2 3 #ifndef __USB_TYPEC_MUX__ 4 #define __USB_TYPEC_MUX__ 5 6 #include <linux/usb/typec_mux.h> 7 8 struct typec_switch { 9 struct device dev; 10 typec_switch_set_fn_t set; 11 }; 12 13 struct typec_mux { 14 struct device dev; 15 typec_mux_set_fn_t set; 16 }; 17 18 #define to_typec_switch(_dev_) container_of(_dev_, struct typec_switch, dev) 19 #define to_typec_mux(_dev_) container_of(_dev_, struct typec_mux, dev) 20 21 extern const struct device_type typec_switch_dev_type; 22 extern const struct device_type typec_mux_dev_type; 23 24 #define is_typec_switch(dev) ((dev)->type == &typec_switch_dev_type) 25 #define is_typec_mux(dev) ((dev)->type == &typec_mux_dev_type) 26 27 #endif /* __USB_TYPEC_MUX__ */ 28