Skip to content

Commit 4815b75

Browse files
aborzeszwesteri
authored andcommitted
thunderbolt: Update lc.c function documentation
Make lc.c function documentation compliant with current kernel-doc standards. No functional changes. Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
1 parent 728ab0e commit 4815b75

1 file changed

Lines changed: 43 additions & 15 deletions

File tree

  • drivers/thunderbolt

drivers/thunderbolt/lc.c

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* tb_lc_read_uuid() - Read switch UUID from link controller common register
1515
* @sw: Switch whose UUID is read
1616
* @uuid: UUID is placed here
17+
*
18+
* Return: %0 on success, negative errno otherwise.
1719
*/
1820
int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid)
1921
{
@@ -52,9 +54,10 @@ static int find_port_lc_cap(struct tb_port *port)
5254
* @port: Port that is reset
5355
*
5456
* Triggers downstream port reset through link controller registers.
55-
* Returns %0 in case of success negative errno otherwise. Only supports
56-
* non-USB4 routers with link controller (that's Thunderbolt 2 and
57-
* Thunderbolt 3).
57+
* Only supports non-USB4 routers with link controller (that's
58+
* Thunderbolt 2 and Thunderbolt 3).
59+
*
60+
* Return: %0 on success, negative errno otherwise.
5861
*/
5962
int tb_lc_reset_port(struct tb_port *port)
6063
{
@@ -132,6 +135,8 @@ static int tb_lc_set_port_configured(struct tb_port *port, bool configured)
132135
* @port: Port that is set as configured
133136
*
134137
* Sets the port configured for power management purposes.
138+
*
139+
* Return: %0 on success, negative errno otherwise.
135140
*/
136141
int tb_lc_configure_port(struct tb_port *port)
137142
{
@@ -143,6 +148,8 @@ int tb_lc_configure_port(struct tb_port *port)
143148
* @port: Port that is set as configured
144149
*
145150
* Sets the port unconfigured for power management purposes.
151+
*
152+
* Return: %0 on success, negative errno otherwise.
146153
*/
147154
void tb_lc_unconfigure_port(struct tb_port *port)
148155
{
@@ -184,8 +191,10 @@ static int tb_lc_set_xdomain_configured(struct tb_port *port, bool configure)
184191
* tb_lc_configure_xdomain() - Inform LC that the link is XDomain
185192
* @port: Switch downstream port connected to another host
186193
*
187-
* Sets the lane configured for XDomain accordingly so that the LC knows
188-
* about this. Returns %0 in success and negative errno in failure.
194+
* Sets the lane configured for XDomain accordingly so that LC knows
195+
* about this.
196+
*
197+
* Return: %0 on success, negative errno otherwise.
189198
*/
190199
int tb_lc_configure_xdomain(struct tb_port *port)
191200
{
@@ -211,7 +220,7 @@ void tb_lc_unconfigure_xdomain(struct tb_port *port)
211220
* sleep. Should be called for those downstream lane adapters that were
212221
* not connected (tb_lc_configure_port() was not called) before sleep.
213222
*
214-
* Returns %0 in success and negative errno in case of failure.
223+
* Return: %0 on success, negative errno otherwise.
215224
*/
216225
int tb_lc_start_lane_initialization(struct tb_port *port)
217226
{
@@ -244,6 +253,8 @@ int tb_lc_start_lane_initialization(struct tb_port *port)
244253
*
245254
* TB_LC_LINK_ATTR_CPS bit reflects if the link supports CLx including
246255
* active cables (if connected on the link).
256+
*
257+
* Return: %true if CLx is supported, %false otherwise.
247258
*/
248259
bool tb_lc_is_clx_supported(struct tb_port *port)
249260
{
@@ -266,7 +277,8 @@ bool tb_lc_is_clx_supported(struct tb_port *port)
266277
* tb_lc_is_usb_plugged() - Is there USB device connected to port
267278
* @port: Device router lane 0 adapter
268279
*
269-
* Returns true if the @port has USB type-C device connected.
280+
* Return: %true if the @port has USB Type-C device connected, %false
281+
* otherwise.
270282
*/
271283
bool tb_lc_is_usb_plugged(struct tb_port *port)
272284
{
@@ -292,7 +304,8 @@ bool tb_lc_is_usb_plugged(struct tb_port *port)
292304
* tb_lc_is_xhci_connected() - Is the internal xHCI connected
293305
* @port: Device router lane 0 adapter
294306
*
295-
* Returns true if the internal xHCI has been connected to @port.
307+
* Return: %true if the internal xHCI has been connected to
308+
* @port, %false otherwise.
296309
*/
297310
bool tb_lc_is_xhci_connected(struct tb_port *port)
298311
{
@@ -343,9 +356,10 @@ static int __tb_lc_xhci_connect(struct tb_port *port, bool connect)
343356
* tb_lc_xhci_connect() - Connect internal xHCI
344357
* @port: Device router lane 0 adapter
345358
*
346-
* Tells LC to connect the internal xHCI to @port. Returns %0 on success
347-
* and negative errno in case of failure. Can be called for Thunderbolt 3
348-
* routers only.
359+
* Tells LC to connect the internal xHCI to @port. Can be called for
360+
* Thunderbolt 3 routers only.
361+
*
362+
* Return: %0 on success, negative errno otherwise.
349363
*/
350364
int tb_lc_xhci_connect(struct tb_port *port)
351365
{
@@ -408,6 +422,8 @@ static int tb_lc_set_wake_one(struct tb_switch *sw, unsigned int offset,
408422
* @flags: Wakeup flags (%0 to disable)
409423
*
410424
* For each LC sets wake bits accordingly.
425+
*
426+
* Return: %0 on success, negative errno otherwise.
411427
*/
412428
int tb_lc_set_wake(struct tb_switch *sw, unsigned int flags)
413429
{
@@ -447,6 +463,8 @@ int tb_lc_set_wake(struct tb_switch *sw, unsigned int flags)
447463
*
448464
* Let the switch link controllers know that the switch is going to
449465
* sleep.
466+
*
467+
* Return: %0 on success, negative errno otherwise.
450468
*/
451469
int tb_lc_set_sleep(struct tb_switch *sw)
452470
{
@@ -491,6 +509,8 @@ int tb_lc_set_sleep(struct tb_switch *sw)
491509
*
492510
* Checks whether conditions for lane bonding from parent to @sw are
493511
* possible.
512+
*
513+
* Return: %true if lane bonding is possible, %false otherwise.
494514
*/
495515
bool tb_lc_lane_bonding_possible(struct tb_switch *sw)
496516
{
@@ -562,6 +582,8 @@ static int tb_lc_dp_sink_available(struct tb_switch *sw, int sink)
562582
*
563583
* Queries through LC SNK_ALLOCATION registers whether DP sink is available
564584
* for the given DP IN port or not.
585+
*
586+
* Return: %true if DP sink is available, %false otherwise.
565587
*/
566588
bool tb_lc_dp_sink_query(struct tb_switch *sw, struct tb_port *in)
567589
{
@@ -586,10 +608,12 @@ bool tb_lc_dp_sink_query(struct tb_switch *sw, struct tb_port *in)
586608
* @sw: Switch whose DP sink is allocated
587609
* @in: DP IN port the DP sink is allocated for
588610
*
589-
* Allocate DP sink for @in via LC SNK_ALLOCATION registers. If the
590-
* resource is available and allocation is successful returns %0. In all
591-
* other cases returs negative errno. In particular %-EBUSY is returned if
592-
* the resource was not available.
611+
* Allocate DP sink for @in via LC SNK_ALLOCATION registers.
612+
*
613+
* Return:
614+
* * %0 - If the resource is available and allocation is successful.
615+
* * %-EBUSY - If resource is not available.
616+
* * Negative errno - Another error occurred.
593617
*/
594618
int tb_lc_dp_sink_alloc(struct tb_switch *sw, struct tb_port *in)
595619
{
@@ -637,6 +661,8 @@ int tb_lc_dp_sink_alloc(struct tb_switch *sw, struct tb_port *in)
637661
* @in: DP IN port whose DP sink is de-allocated
638662
*
639663
* De-allocate DP sink from @in using LC SNK_ALLOCATION registers.
664+
*
665+
* Return: %0 on success, negative errno otherwise.
640666
*/
641667
int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in)
642668
{
@@ -680,6 +706,8 @@ int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in)
680706
*
681707
* This is useful to let authentication cycle pass even without
682708
* a Thunderbolt link present.
709+
*
710+
* Return: %0 on success, negative errno otherwise.
683711
*/
684712
int tb_lc_force_power(struct tb_switch *sw)
685713
{

0 commit comments

Comments
 (0)