Since with accessory modes there is no need for additional identification when requesting a handle to the mux, we can replace the second parameter that is passed to the typec_mux_get() function with a pointer to alternate mode description structure, and simply passing NULL with accessory modes. This change means the naming of the mux device connections can be updated. Alternate and Accessory Modes will both be handled with muxes named "mode-switch", and the orientation switches will be named "orientation-switch". Future identification of the alternate modes will be later done using device property "svid" of the mux.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -47,7 +47,8 @@ void typec_switch_put(struct typec_switch *sw); · 46 unmodified lines | ||
| 47 | 47 | int typec_switch_register(struct typec_switch *sw); |
| 48 | 48 | void typec_switch_unregister(struct typec_switch *sw); |
| 49 | 49 | |
| 50 | −struct typec_mux *typec_mux_get(struct device *dev, const char *name); | |
| 50 | +struct typec_mux * | |
| 51 | +typec_mux_get(struct device *dev, const struct typec_altmode_desc *desc); | |
| 51 | 52 | void typec_mux_put(struct typec_mux *mux); |
| 52 | 53 | int typec_mux_register(struct typec_mux *mux); |
| 53 | 54 | void typec_mux_unregister(struct typec_mux *mux); |