Skip to contentSkip to conversation

usb: typec: Generalize mux mode names

RFC New Heikki Krogerus 1 participant 1 message May 2, 2018 USB

lore
Share & tools
lore
#0 lore raw

RFC 1/7 usb: typec: Generalize mux mode names

Quoted 25 lines · Heikki Krogerus

Hi Mats,

Quoted 6 lines · Mats Karrman

The current naming used for tcpc_mux_mode constants makes too much assumptioms about the usage of the signals. This patch replaces the names with generic names more closely tied to the Type-C specifications and also adds some new ones. At the same time TCPC_MUX_* defines are removed as they do not fit the new concept and currently have no in-tree users.

I'm afraid trying to generalize the modal connector states even like this is not going to work. We can't make any assumptions about how the alternate modes configure the pins, or the connector in general.

The only way this will work is that every alternate mode has its own configurations defined separately, and I'm talking about the actual pin configurations that the specifications for each alternate mode defines, so something like TYPEC_MUX_DP and TYPEC_MUX_DOCK will not work for sure.

The connector states that are defined in USB Type-C specification (so basically USB Operation and USB Safe State) can be generalized, but those states just should not be defined in tcpm.h. We need to use them in other drivers as well.

Quoted 4 lines

I'm in the middle of preparing more complete support for alternate modes. If you check the RFC [1] I send previously, in the first patch of the series I'm adding documentation that should explain the plan.

Sorry, I forgot the link:

[1] https://www.spinics.net/lists/linux-usb/msg166520.html

Cheers,