Skip to content

Commit 895933b

Browse files
svenpeter42jannau
authored andcommitted
usb: dwc3: glue: Add documentation
We're about to add more exported functions to be used inside glue driver which will need more detailed documentation explaining how they must be used. Let's also add documentation for the functions already available. Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Signed-off-by: Sven Peter <sven@kernel.org> Link: https://patch.msgid.link/20251015-b4-aplpe-dwc3-v2-3-cbd65a2d511a@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent bcb84b4 commit 895933b

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

drivers/usb/dwc3/glue.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,36 @@ struct dwc3_probe_data {
3636
struct dwc3_properties properties;
3737
};
3838

39+
/**
40+
* dwc3_core_probe - Initialize the core dwc3 driver
41+
* @data: Initialization and configuration parameters for the controller
42+
*
43+
* Initializes the DesignWare USB3 core driver by setting up resources,
44+
* registering interrupts, performing hardware setup, and preparing
45+
* the controller for operation in the appropriate mode (host, gadget,
46+
* or OTG). This is the main initialization function called by glue
47+
* layer drivers to set up the core controller.
48+
*
49+
* Return: 0 on success, negative error code on failure
50+
*/
3951
int dwc3_core_probe(const struct dwc3_probe_data *data);
52+
53+
/**
54+
* dwc3_core_remove - Deinitialize and remove the core dwc3 driver
55+
* @dwc: Pointer to DWC3 controller context
56+
*
57+
* Cleans up resources and disables the dwc3 core driver. This should be called
58+
* during driver removal or when the glue layer needs to shut down the
59+
* controller completely.
60+
*/
4061
void dwc3_core_remove(struct dwc3 *dwc);
4162

63+
/*
64+
* The following callbacks are provided for glue drivers to call from their
65+
* own pm callbacks provided in struct dev_pm_ops. Glue drivers can perform
66+
* platform-specific work before or after calling these functions and delegate
67+
* the core suspend/resume operations to the core driver.
68+
*/
4269
int dwc3_runtime_suspend(struct dwc3 *dwc);
4370
int dwc3_runtime_resume(struct dwc3 *dwc);
4471
int dwc3_runtime_idle(struct dwc3 *dwc);

0 commit comments

Comments
 (0)