@@ -13,10 +13,10 @@ every alternate mode, so every alternate mode will need a custom driver.
13
13
USB Type-C bus allows binding a driver to the discovered partner alternate
14
14
modes by using the SVID and the mode number.
15
15
16
- USB Type-C Connector Class provides a device for every alternate mode a port
17
- supports, and separate device for every alternate mode the partner supports.
18
- The drivers for the alternate modes are bound to the partner alternate mode
19
- devices, and the port alternate mode devices must be handled by the port
16
+ :ref: ` USB Type-C Connector Class < typec >` provides a device for every alternate
17
+ mode a port supports, and separate device for every alternate mode the partner
18
+ supports. The drivers for the alternate modes are bound to the partner alternate
19
+ mode devices, and the port alternate mode devices must be handled by the port
20
20
drivers.
21
21
22
22
When a new partner alternate mode device is registered, it is linked to the
@@ -46,7 +46,7 @@ enter any modes on their own.
46
46
``->vdm `` is the most important callback in the operation callbacks vector. It
47
47
will be used to deliver all the SVID specific commands from the partner to the
48
48
alternate mode driver, and vice versa in case of port drivers. The drivers send
49
- the SVID specific commands to each other using :c:func: `typec_altmode_vmd () `.
49
+ the SVID specific commands to each other using :c:func: `typec_altmode_vdm () `.
50
50
51
51
If the communication with the partner using the SVID specific commands results
52
52
in need to reconfigure the pins on the connector, the alternate mode driver
@@ -67,15 +67,15 @@ Type-C Specification, and also put the connector back to ``TYPEC_STATE_USB``
67
67
after the mode has been exited.
68
68
69
69
An example of working definitions for SVID specific pin configurations would
70
- look like this:
70
+ look like this::
71
71
72
- enum {
73
- ALTMODEX_CONF_A = TYPEC_STATE_MODAL,
74
- ALTMODEX_CONF_B,
75
- ...
76
- };
72
+ enum {
73
+ ALTMODEX_CONF_A = TYPEC_STATE_MODAL,
74
+ ALTMODEX_CONF_B,
75
+ ...
76
+ };
77
77
78
- Helper macro ``TYPEC_MODAL_STATE() `` can also be used:
78
+ Helper macro ``TYPEC_MODAL_STATE() `` can also be used::
79
79
80
80
#define ALTMODEX_CONF_A = TYPEC_MODAL_STATE(0);
81
81
#define ALTMODEX_CONF_B = TYPEC_MODAL_STATE(1);
0 commit comments