mux.h (722B)
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 8struct typec_switch_dev { 9 struct device dev; 10 typec_switch_set_fn_t set; 11}; 12 13struct typec_mux_dev { 14 struct device dev; 15 typec_mux_set_fn_t set; 16}; 17 18#define to_typec_switch_dev(_dev_) container_of(_dev_, struct typec_switch_dev, dev) 19#define to_typec_mux_dev(_dev_) container_of(_dev_, struct typec_mux_dev, dev) 20 21extern const struct device_type typec_switch_dev_type; 22extern const struct device_type typec_mux_dev_type; 23 24#define is_typec_switch_dev(dev) ((dev)->type == &typec_switch_dev_type) 25#define is_typec_mux_dev(dev) ((dev)->type == &typec_mux_dev_type) 26 27#endif /* __USB_TYPEC_MUX__ */