usb: typec: Give the mux drivers all the details regarding the port state
[linux-2.6-microblaze.git] / include / linux / usb / typec_mux.h
index 873ace5..be7292c 100644 (file)
@@ -8,6 +8,7 @@
 struct device;
 struct typec_mux;
 struct typec_switch;
+struct typec_altmode;
 struct fwnode_handle;
 
 typedef int (*typec_switch_set_fn_t)(struct typec_switch *sw,
@@ -29,7 +30,14 @@ void typec_switch_unregister(struct typec_switch *sw);
 void typec_switch_set_drvdata(struct typec_switch *sw, void *data);
 void *typec_switch_get_drvdata(struct typec_switch *sw);
 
-typedef int (*typec_mux_set_fn_t)(struct typec_mux *mux, int state);
+struct typec_mux_state {
+       struct typec_altmode *alt;
+       unsigned long mode;
+       void *data;
+};
+
+typedef int (*typec_mux_set_fn_t)(struct typec_mux *mux,
+                                 struct typec_mux_state *state);
 
 struct typec_mux_desc {
        struct fwnode_handle *fwnode;