[PATCH v14 29/38] usb: dwc3: rockchip: introduce glue driver
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Aug 13 22:22:06 PDT 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Unconditional assignment of conditionally compiled `.complete` and `.prepare` PM callbacks in `dwc3_rockchip_dev_pm_ops` causes a build failure when `CONFIG_PM_SLEEP` is disabled.
--
--- Patch [29]: [PATCH v14 29/38] usb: dwc3: rockchip: introduce glue driver ---
commit 09abcbc065934ad4bfba3499b24e1bd888881c9d
Author: Sebastian Reichel <sebastian.reichel at collabora.com>
usb: dwc3: rockchip: introduce glue driver
Introduce Rockchip specific glue code for the Synopsys DWC3 USB driver.
For now this handles things identical to the default glue.
> diff --git a/drivers/usb/dwc3/dwc3-rockchip.c b/drivers/usb/dwc3/dwc3-rockchip.c
> new file mode 100644
> index 0000000000000..1df33625b69f8
> --- /dev/null
> +++ b/drivers/usb/dwc3/dwc3-rockchip.c
[ ... ]
> +static void dwc3_rockchip_complete(struct device *dev)
> +{
> + dwc3_pm_complete(dev_get_drvdata(dev));
> +}
> +
> +static int dwc3_rockchip_prepare(struct device *dev)
> +{
> + return dwc3_pm_prepare(dev_get_drvdata(dev));
> +}
> +#endif
> +
> +static const struct dev_pm_ops dwc3_rockchip_dev_pm_ops = {
> + SET_SYSTEM_SLEEP_PM_OPS(dwc3_rockchip_suspend, dwc3_rockchip_resume)
> + .complete = dwc3_rockchip_complete,
> + .prepare = dwc3_rockchip_prepare,
[Severity: Low]
Will this cause a build failure when CONFIG_PM_SLEEP is disabled?
The functions dwc3_rockchip_complete() and dwc3_rockchip_prepare() are
defined inside an #ifdef CONFIG_PM_SLEEP block, but they are referenced
unconditionally here in dwc3_rockchip_dev_pm_ops.
This would leave them undeclared if sleep support is not configured.
> + /*
> + * Runtime suspend halts the controller on disconnection. It relies on
> + * platforms with custom connection notification to start the controller
> + * again.
> + */
> + SET_RUNTIME_PM_OPS(dwc3_rockchip_runtime_suspend, dwc3_rockchip_runtime_resume,
> + dwc3_rockchip_runtime_idle)
> +};
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260813-rockchip-usbdp-cleanup-v14-0-b5ad9c68fa11@collabora.com?part=29
More information about the linux-phy
mailing list