[PATCH v6 6/6] phy: fsl-imx8mq-usb: keep PHY power domain runtime always-on for i.MX8MP

sashiko-bot at kernel.org sashiko-bot at kernel.org
Wed Jul 15 04:44:05 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The driver unconditionally fails probe if dev_pm_genpd_rpm_always_on() returns an error. This breaks backward compatibility on configurations without generic power domains or when the device tree lacks a power-domains property.
--

--- Patch [6]: [PATCH v6 6/6] phy: fsl-imx8mq-usb: keep PHY power domain runtime always-on for i.MX8MP ---
commit 14514f8e33060037a734acad2199e7febc56def8
Author: Xu Yang <xu.yang_2 at nxp.com>
Subject: phy: fsl-imx8mq-usb: keep PHY power domain runtime always-on for i.MX8MP

This commit marks the PHY power domain as runtime always-on for the i.MX8MP
platform to prevent it from being powered off during runtime suspend. This is
intended to preserve USB wakeup functionality on i.MX8MP.

> diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c

[ ... ]

> @@ -739,6 +742,12 @@ static int imx8mq_usb_phy_probe(struct platform_device *pdev)
>  	if (!phy_data)
>  		return -EINVAL;
>  
> +	if (phy_data->need_genpd_rpm_on) {
> +		ret = dev_pm_genpd_rpm_always_on(dev, true);
> +		if (ret)
> +			return dev_err_probe(dev, ret, "failed to set genpd rpm always on\n");

[Severity: High]
Does this code cause probe to fail unnecessarily when generic power domains
are disabled or not configured in the device tree?

If the kernel is compiled without CONFIG_PM_GENERIC_DOMAINS,
dev_pm_genpd_rpm_always_on() will return -EOPNOTSUPP. Similarly, if the
device tree lacks a 'power-domains' property for the PHY node, it may return
-ENODEV.

Since the power domain won't be runtime-suspended by the generic power domain
framework in these cases, the wakeup issue this patch intends to fix doesn't
exist.

Should this check ignore non-fatal errors like -EOPNOTSUPP and -ENODEV to
preserve backward compatibility with older device trees and minimal kernel
configurations?

> +	}
> +
>  	imx_phy->phy = devm_phy_create(dev, NULL, phy_data->ops);
>  	if (IS_ERR(imx_phy->phy))
>  		return PTR_ERR(imx_phy->phy);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260715-imx8mp-usb-phy-improvement-v6-0-00d95e270e4c@nxp.com?part=6



More information about the linux-phy mailing list