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 #include <linux/android_kabi.h> 8 9 struct typec_switch { 10 struct device dev; 11 typec_switch_set_fn_t set; 12 ANDROID_KABI_RESERVE(1); 13 }; 14 15 struct typec_mux { 16 struct device dev; 17 typec_mux_set_fn_t set; 18 ANDROID_KABI_RESERVE(1); 19 }; 20 21 #define to_typec_switch(_dev_) container_of(_dev_, struct typec_switch, dev) 22 #define to_typec_mux(_dev_) container_of(_dev_, struct typec_mux, dev) 23 24 extern const struct device_type typec_switch_dev_type; 25 extern const struct device_type typec_mux_dev_type; 26 27 #define is_typec_switch(dev) ((dev)->type == &typec_switch_dev_type) 28 #define is_typec_mux(dev) ((dev)->type == &typec_mux_dev_type) 29 30 #endif /* __USB_TYPEC_MUX__ */ 31