thunderbolt: Update dma_port.c function documentation

Make dma_port.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>
This commit is contained in:
Alan Borzeszkowski 2025-08-27 13:56:26 +02:00 committed by Mika Westerberg
parent 12cb68e486
commit a84be45d33
1 changed files with 16 additions and 5 deletions

View File

@ -197,6 +197,8 @@ static int dma_find_port(struct tb_switch *sw)
* *
* The DMA control port is functional also when the switch is in safe * The DMA control port is functional also when the switch is in safe
* mode. * mode.
*
* Return: &struct tb_dma_port on success, %NULL otherwise.
*/ */
struct tb_dma_port *dma_port_alloc(struct tb_switch *sw) struct tb_dma_port *dma_port_alloc(struct tb_switch *sw)
{ {
@ -354,6 +356,8 @@ static int dma_port_flash_write_block(void *data, unsigned int dwaddress,
* @address: Address relative to the start of active region * @address: Address relative to the start of active region
* @buf: Buffer where the data is read * @buf: Buffer where the data is read
* @size: Size of the buffer * @size: Size of the buffer
*
* Return: %0 on success, negative errno otherwise.
*/ */
int dma_port_flash_read(struct tb_dma_port *dma, unsigned int address, int dma_port_flash_read(struct tb_dma_port *dma, unsigned int address,
void *buf, size_t size) void *buf, size_t size)
@ -372,6 +376,8 @@ int dma_port_flash_read(struct tb_dma_port *dma, unsigned int address,
* Writes block of data to the non-active flash region of the switch. If * Writes block of data to the non-active flash region of the switch. If
* the address is given as %DMA_PORT_CSS_ADDRESS the block is written * the address is given as %DMA_PORT_CSS_ADDRESS the block is written
* using CSS command. * using CSS command.
*
* Return: %0 on success, negative errno otherwise.
*/ */
int dma_port_flash_write(struct tb_dma_port *dma, unsigned int address, int dma_port_flash_write(struct tb_dma_port *dma, unsigned int address,
const void *buf, size_t size) const void *buf, size_t size)
@ -393,6 +399,8 @@ int dma_port_flash_write(struct tb_dma_port *dma, unsigned int address,
* dma_port_flash_update_auth_status() to get status of this command. * dma_port_flash_update_auth_status() to get status of this command.
* This is because if the switch in question is root switch the * This is because if the switch in question is root switch the
* thunderbolt host controller gets reset as well. * thunderbolt host controller gets reset as well.
*
* Return: %0 on success, negative errno otherwise.
*/ */
int dma_port_flash_update_auth(struct tb_dma_port *dma) int dma_port_flash_update_auth(struct tb_dma_port *dma)
{ {
@ -410,11 +418,12 @@ int dma_port_flash_update_auth(struct tb_dma_port *dma)
* @status: Status code of the operation * @status: Status code of the operation
* *
* The function checks if there is status available from the last update * The function checks if there is status available from the last update
* auth command. Returns %0 if there is no status and no further * auth command.
* action is required. If there is status, %1 is returned instead and
* @status holds the failure code.
* *
* Negative return means there was an error reading status from the * Return:
* * %0 - If there is no status and no further action is required.
* * %1 - If there is some status. @status holds the failure code.
* * Negative errno - An error occurred when reading status from the
* switch. * switch.
*/ */
int dma_port_flash_update_auth_status(struct tb_dma_port *dma, u32 *status) int dma_port_flash_update_auth_status(struct tb_dma_port *dma, u32 *status)
@ -446,6 +455,8 @@ int dma_port_flash_update_auth_status(struct tb_dma_port *dma, u32 *status)
* @dma: DMA control port * @dma: DMA control port
* *
* Triggers power cycle to the switch. * Triggers power cycle to the switch.
*
* Return: %0 on success, negative errno otherwise.
*/ */
int dma_port_power_cycle(struct tb_dma_port *dma) int dma_port_power_cycle(struct tb_dma_port *dma)
{ {