summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Peter <sven@kernel.org>2025-10-15 18:40:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-22 11:58:31 +0300
commite10bc7964635c5ada5d69d53bf8173501fc03a26 (patch)
tree9f4002ab6d7f846d220b63c95e26be8083ed4f09
parent5ed9cc71432a8adf3c42223c935f714aac29901b (diff)
downloadlinux-e10bc7964635c5ada5d69d53bf8173501fc03a26.tar.xz
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>
-rw-r--r--drivers/usb/dwc3/glue.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/glue.h b/drivers/usb/dwc3/glue.h
index cc6e138bd9ef..bef4d9d68558 100644
--- a/drivers/usb/dwc3/glue.h
+++ b/drivers/usb/dwc3/glue.h
@@ -36,9 +36,36 @@ struct dwc3_probe_data {
struct dwc3_properties properties;
};
+/**
+ * dwc3_core_probe - Initialize the core dwc3 driver
+ * @data: Initialization and configuration parameters for the controller
+ *
+ * Initializes the DesignWare USB3 core driver by setting up resources,
+ * registering interrupts, performing hardware setup, and preparing
+ * the controller for operation in the appropriate mode (host, gadget,
+ * or OTG). This is the main initialization function called by glue
+ * layer drivers to set up the core controller.
+ *
+ * Return: 0 on success, negative error code on failure
+ */
int dwc3_core_probe(const struct dwc3_probe_data *data);
+
+/**
+ * dwc3_core_remove - Deinitialize and remove the core dwc3 driver
+ * @dwc: Pointer to DWC3 controller context
+ *
+ * Cleans up resources and disables the dwc3 core driver. This should be called
+ * during driver removal or when the glue layer needs to shut down the
+ * controller completely.
+ */
void dwc3_core_remove(struct dwc3 *dwc);
+/*
+ * The following callbacks are provided for glue drivers to call from their
+ * own pm callbacks provided in struct dev_pm_ops. Glue drivers can perform
+ * platform-specific work before or after calling these functions and delegate
+ * the core suspend/resume operations to the core driver.
+ */
int dwc3_runtime_suspend(struct dwc3 *dwc);
int dwc3_runtime_resume(struct dwc3 *dwc);
int dwc3_runtime_idle(struct dwc3 *dwc);