From: sashiko-bot@kernel.org
To: "Xu Yang" <xu.yang_2@oss.nxp.com>
Cc: Frank.Li@kernel.org, imx@lists.linux.dev, vkoul@kernel.org,
neil.armstrong@linaro.org, linux-phy@lists.infradead.org,
olteanv@gmail.com
Subject: Re: [PATCH v7 4/6] phy: fsl-imx8mq-usb: add control register regmap
Date: Wed, 29 Jul 2026 06:49:23 +0000 [thread overview]
Message-ID: <20260729064925.79F751F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260729-imx8mp-usb-phy-improvement-v7-4-c385ee40ade6@nxp.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Incorrect error handling of pm_runtime_get_sync() treats a successful active state as a failure.
- [Low] Missing Kconfig dependency for REGMAP_MMIO.
--
--- Patch [4]: [PATCH v7 4/6] phy: fsl-imx8mq-usb: add control register regmap ---
commit 3be8b97176fdd5e159a3f1a8541ee32a8755658b
Author: Xu Yang <xu.yang_2@nxp.com>
phy: fsl-imx8mq-usb: add control register regmap
This commit adds a 32-bit MMIO control register regmap for on-chip access
to the control registers inside the USB 3.0 femtoPHY. It exports these
registers via debugfs to help with PHY diagnostic.
> diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> index 74e665525ec48..83d5a44c40848 100644
> --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
[ ... ]
> @@ -696,6 +708,13 @@ static int imx8mq_usb_phy_probe(struct platform_device *pdev)
> if (IS_ERR(imx_phy->base))
> return PTR_ERR(imx_phy->base);
>
> + imx_phy->cr_regmap = devm_regmap_init_mmio(dev, imx_phy->base + PHY_CRCTL,
> + &imx_cr_regmap_config);
[Severity: Low]
Does this new regmap initialization require a Kconfig update?
Since the driver now uses devm_regmap_init_mmio(), it depends on the MMIO
regmap subsystem. However, PHY_FSL_IMX8MQ_USB in drivers/phy/freescale/Kconfig
does not select REGMAP_MMIO.
Could this lead to build failures (such as missing module or undefined
reference to __devm_regmap_init_mmio_clk) in configurations where no other
component selects REGMAP_MMIO?
> + if (IS_ERR(imx_phy->cr_regmap)) {
> + dev_warn(dev, "Fail to init debug register regmap\n");
> + imx_phy->cr_regmap = NULL;
> + }
> +
[ ... ]
[Severity: Medium]
Looking at the driver's unbind path in imx8mq_usb_phy_remove():
static void imx8mq_usb_phy_remove(struct platform_device *pdev)
{
...
ret = pm_runtime_get_sync(dev);
if (ret)
dev_warn(dev, "failed to resume on remove: %d\n", ret);
According to the PM subsystem rules, pm_runtime_get_sync() returns 1 when the
device is already active. Does checking if (ret) instead of if (ret < 0)
treat this success condition as a failure, potentially causing a spurious
kernel warning during driver unbind?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260729-imx8mp-usb-phy-improvement-v7-0-c385ee40ade6@nxp.com?part=4
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-07-29 6:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 6:38 [PATCH v7 0/6] phy: fsl-imx8mq-usb: few improvements Xu Yang
2026-07-29 6:38 ` [PATCH v7 1/6] phy: fsl-imx8mq-usb: fix typec switch leak on probe error path Xu Yang
2026-07-29 6:47 ` sashiko-bot
2026-07-29 6:38 ` [PATCH v7 2/6] phy: fsl-imx8mq-usb: set usb phy to be wakeup capable Xu Yang
2026-07-29 6:38 ` [PATCH v7 3/6] phy: fsl-imx8mq-usb: add runtime PM support Xu Yang
2026-07-29 6:55 ` sashiko-bot
2026-07-29 8:08 ` Xu Yang
2026-07-29 6:38 ` [PATCH v7 4/6] phy: fsl-imx8mq-usb: add control register regmap Xu Yang
2026-07-29 6:49 ` sashiko-bot [this message]
2026-07-29 6:38 ` [PATCH v7 5/6] phy: fsl-imx8mq-usb: introduce per-variant driver data structure Xu Yang
2026-07-29 6:38 ` [PATCH v7 6/6] phy: fsl-imx8mq-usb: keep PHY power domain runtime always-on for i.MX8MP Xu Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260729064925.79F751F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=imx@lists.linux.dev \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@kernel.org \
--cc=xu.yang_2@oss.nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox