History

usb: typec: Rationalize the API for the muxes

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.

Heikki Krogerus committed 7 years ago

Commit 540bfab1 parent 78757323 files · +10 −10Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/usb/typec_mux.h+2−1
@@ -47,7 +47,8 @@ void typec_switch_put(struct typec_switch *sw); · 46 unmodified lines
4747 int typec_switch_register(struct typec_switch *sw);
4848 void typec_switch_unregister(struct typec_switch *sw);
4949
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);
5152 void typec_mux_put(struct typec_mux *mux);
5253 int typec_mux_register(struct typec_mux *mux);
5354 void typec_mux_unregister(struct typec_mux *mux);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t