Skip to content

Commit fbb6cd1

Browse files
jfischer-nonashif
authored andcommitted
doc: connectivity: move USB-C device stack to USB chapter
This looks a bit lost in its own USB-C chapter, move it to USB under the Power Delivery heading. Signed-off-by: Johann Fischer <[email protected]>
1 parent b335c19 commit fbb6cd1

File tree

5 files changed

+27
-30
lines changed

5 files changed

+27
-30
lines changed

MAINTAINERS.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2636,7 +2636,7 @@ USB-C:
26362636
- include/zephyr/usb_c/
26372637
- samples/subsys/usb_c/
26382638
- subsys/usb/usb_c/
2639-
- doc/connectivity/usb_c/
2639+
- doc/connectivity/usb/pd/
26402640
labels:
26412641
- "area: USB-C"
26422642

doc/connectivity/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ Connectivity
1010
networking/index.rst
1111
lora_lorawan/index.rst
1212
usb/index.rst
13-
usb_c/index.rst

doc/connectivity/usb/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ USB
2020
device_next/api/index.rst
2121
host/api/index.rst
2222

23+
**USB Power Delivery support**
24+
25+
.. toctree::
26+
:maxdepth: 1
27+
28+
pd/ucds.rst
29+
2330
**Common sections related to USB support**
2431

2532
.. toctree::

doc/connectivity/usb_c/ucds.rst renamed to doc/connectivity/usb/pd/ucds.rst

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _usbc_device_stack:
1+
.. _usbc_api:
22

33
USB-C device stack
44
##################
@@ -36,7 +36,7 @@ For example, for the Sample USB-C Sink application:
3636
Each Physical Type-C port is represented in the devicetree by a usb-c-connector
3737
compatible node:
3838

39-
.. literalinclude:: ../../../samples/subsys/usb_c/sink/boards/b_g474e_dpow1.overlay
39+
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/boards/b_g474e_dpow1.overlay
4040
:language: dts
4141
:start-after: usbc.rst usbc-port start
4242
:end-before: usbc.rst usbc-port end
@@ -45,7 +45,7 @@ compatible node:
4545
VBUS is measured by a device that's referenced in the devicetree by a
4646
usb-c-vbus-adc compatible node:
4747

48-
.. literalinclude:: ../../../samples/subsys/usb_c/sink/boards/b_g474e_dpow1.overlay
48+
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/boards/b_g474e_dpow1.overlay
4949
:language: dts
5050
:start-after: usbc.rst vbus-voltage-divider-adc start
5151
:end-before: usbc.rst vbus-voltage-divider-adc end
@@ -55,55 +55,55 @@ usb-c-vbus-adc compatible node:
5555
A user defined structure is defined and later registered with the subsystem and can
5656
be accessed from callback through an API:
5757

58-
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
58+
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
5959
:language: c
6060
:start-after: usbc.rst port data object start
6161
:end-before: usbc.rst port data object end
6262
:linenos:
6363

6464
These callbacks are used by the subsystem to set or get application specific data:
6565

66-
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
66+
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
6767
:language: c
6868
:start-after: usbc.rst callbacks start
6969
:end-before: usbc.rst callbacks end
7070
:linenos:
7171

7272
This callback is used by the subsystem to query if a certain action can be taken:
7373

74-
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
74+
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
7575
:language: c
7676
:start-after: usbc.rst check start
7777
:end-before: usbc.rst check end
7878
:linenos:
7979

8080
This callback is used by the subsystem to notify the application of an event:
8181

82-
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
82+
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
8383
:language: c
8484
:start-after: usbc.rst notify start
8585
:end-before: usbc.rst notify end
8686
:linenos:
8787

8888
Registering the callbacks:
8989

90-
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
90+
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
9191
:language: c
9292
:start-after: usbc.rst register start
9393
:end-before: usbc.rst register end
9494
:linenos:
9595

9696
Register the user defined structure:
9797

98-
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
98+
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
9999
:language: c
100100
:start-after: usbc.rst user data start
101101
:end-before: usbc.rst user data end
102102
:linenos:
103103

104104
Start the USB-C subsystem:
105105

106-
.. literalinclude:: ../../../samples/subsys/usb_c/sink/src/main.c
106+
.. literalinclude:: ../../../../samples/subsys/usb_c/sink/src/main.c
107107
:language: c
108108
:start-after: usbc.rst usbc start
109109
:end-before: usbc.rst usbc end
@@ -126,7 +126,7 @@ For example, for the Sample USB-C Source application:
126126
Each Physical Type-C port is represented in the devicetree by a ``usb-c-connector``
127127
compatible node:
128128

129-
.. literalinclude:: ../../../samples/subsys/usb_c/source/boards/stm32g081b_eval.overlay
129+
.. literalinclude:: ../../../../samples/subsys/usb_c/source/boards/stm32g081b_eval.overlay
130130
:language: dts
131131
:start-after: usbc.rst usbc-port start
132132
:end-before: usbc.rst usbc-port end
@@ -135,7 +135,7 @@ compatible node:
135135
VBUS is measured by a device that's referenced in the devicetree by a
136136
``usb-c-vbus-adc`` compatible node:
137137

138-
.. literalinclude:: ../../../samples/subsys/usb_c/source/boards/stm32g081b_eval.overlay
138+
.. literalinclude:: ../../../../samples/subsys/usb_c/source/boards/stm32g081b_eval.overlay
139139
:language: dts
140140
:start-after: usbc.rst vbus-voltage-divider-adc start
141141
:end-before: usbc.rst vbus-voltage-divider-adc end
@@ -145,55 +145,55 @@ VBUS is measured by a device that's referenced in the devicetree by a
145145
A user defined structure is defined and later registered with the subsystem and can
146146
be accessed from callback through an API:
147147

148-
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
148+
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
149149
:language: c
150150
:start-after: usbc.rst port data object start
151151
:end-before: usbc.rst port data object end
152152
:linenos:
153153

154154
These callbacks are used by the subsystem to set or get application specific data:
155155

156-
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
156+
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
157157
:language: c
158158
:start-after: usbc.rst callbacks start
159159
:end-before: usbc.rst callbacks end
160160
:linenos:
161161

162162
This callback is used by the subsystem to query if a certain action can be taken:
163163

164-
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
164+
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
165165
:language: c
166166
:start-after: usbc.rst check start
167167
:end-before: usbc.rst check end
168168
:linenos:
169169

170170
This callback is used by the subsystem to notify the application of an event:
171171

172-
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
172+
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
173173
:language: c
174174
:start-after: usbc.rst notify start
175175
:end-before: usbc.rst notify end
176176
:linenos:
177177

178178
Registering the callbacks:
179179

180-
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
180+
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
181181
:language: c
182182
:start-after: usbc.rst register start
183183
:end-before: usbc.rst register end
184184
:linenos:
185185

186186
Register the user defined structure:
187187

188-
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
188+
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
189189
:language: c
190190
:start-after: usbc.rst user data start
191191
:end-before: usbc.rst user data end
192192
:linenos:
193193

194194
Start the USB-C subsystem:
195195

196-
.. literalinclude:: ../../../samples/subsys/usb_c/source/src/main.c
196+
.. literalinclude:: ../../../../samples/subsys/usb_c/source/src/main.c
197197
:language: c
198198
:start-after: usbc.rst usbc start
199199
:end-before: usbc.rst usbc end

doc/connectivity/usb_c/index.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)