From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Xu Yang <xu.yang_2@nxp.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"festevam@gmail.com" <festevam@gmail.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"jun.li@nxp.com" <jun.li@nxp.com>
Subject: Re: [PATCH v2 2/3] usb: dwc3: imx8mp: rename dwc3 to dwc3_pdev in struct dwc3_imx8mp
Date: Tue, 16 Dec 2025 23:19:32 +0000 [thread overview]
Message-ID: <20251216231930.o3d3b5lrbeb776ip@synopsys.com> (raw)
In-Reply-To: <20251205032942.2259671-2-xu.yang_2@nxp.com>
On Fri, Dec 05, 2025, Xu Yang wrote:
> It's confuse to let "dwc3" represent a platform_device, because "dwc3"
> may also represent a dwc3 core structure. Rename it for better
> distinction.
>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
>
> ---
> Changes in v2:
> - new patch
> ---
> drivers/usb/dwc3/dwc3-imx8mp.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c
> index 050da327f785..8bece4baecbf 100644
> --- a/drivers/usb/dwc3/dwc3-imx8mp.c
> +++ b/drivers/usb/dwc3/dwc3-imx8mp.c
> @@ -51,7 +51,7 @@
>
> struct dwc3_imx8mp {
> struct device *dev;
> - struct platform_device *dwc3;
> + struct platform_device *dwc3_pdev;
> void __iomem *hsio_blk_base;
> void __iomem *glue_base;
> struct clk *hsio_clk;
> @@ -100,7 +100,7 @@ static void imx8mp_configure_glue(struct dwc3_imx8mp *dwc3_imx)
> static void dwc3_imx8mp_wakeup_enable(struct dwc3_imx8mp *dwc3_imx,
> pm_message_t msg)
> {
> - struct dwc3 *dwc3 = platform_get_drvdata(dwc3_imx->dwc3);
> + struct dwc3 *dwc3 = platform_get_drvdata(dwc3_imx->dwc3_pdev);
> u32 val;
>
> if (!dwc3)
> @@ -142,7 +142,7 @@ static const struct software_node dwc3_imx8mp_swnode = {
> static irqreturn_t dwc3_imx8mp_interrupt(int irq, void *_dwc3_imx)
> {
> struct dwc3_imx8mp *dwc3_imx = _dwc3_imx;
> - struct dwc3 *dwc = platform_get_drvdata(dwc3_imx->dwc3);
> + struct dwc3 *dwc = platform_get_drvdata(dwc3_imx->dwc3_pdev);
>
> if (!dwc3_imx->pm_suspended)
> return IRQ_HANDLED;
> @@ -233,8 +233,8 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)
> goto remove_swnode;
> }
>
> - dwc3_imx->dwc3 = of_find_device_by_node(dwc3_np);
> - if (!dwc3_imx->dwc3) {
> + dwc3_imx->dwc3_pdev = of_find_device_by_node(dwc3_np);
> + if (!dwc3_imx->dwc3_pdev) {
> dev_err(dev, "failed to get dwc3 platform device\n");
> err = -ENODEV;
> goto depopulate;
> @@ -253,7 +253,7 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)
> return 0;
>
> put_dwc3:
> - put_device(&dwc3_imx->dwc3->dev);
> + put_device(&dwc3_imx->dwc3_pdev->dev);
> depopulate:
> of_platform_depopulate(dev);
> remove_swnode:
> @@ -270,7 +270,7 @@ static void dwc3_imx8mp_remove(struct platform_device *pdev)
> struct dwc3_imx8mp *dwc3_imx = platform_get_drvdata(pdev);
> struct device *dev = &pdev->dev;
>
> - put_device(&dwc3_imx->dwc3->dev);
> + put_device(&dwc3_imx->dwc3_pdev->dev);
>
> pm_runtime_get_sync(dev);
> of_platform_depopulate(dev);
> @@ -296,7 +296,7 @@ static int dwc3_imx8mp_suspend(struct dwc3_imx8mp *dwc3_imx, pm_message_t msg)
>
> static int dwc3_imx8mp_resume(struct dwc3_imx8mp *dwc3_imx, pm_message_t msg)
> {
> - struct dwc3 *dwc = platform_get_drvdata(dwc3_imx->dwc3);
> + struct dwc3 *dwc = platform_get_drvdata(dwc3_imx->dwc3_pdev);
> int ret = 0;
>
> if (!dwc3_imx->pm_suspended)
> --
> 2.34.1
>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Thanks,
Thinh
next prev parent reply other threads:[~2025-12-16 23:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-05 3:29 [PATCH v2 1/3] usb: dwc3: drd: extend dwc3_pre_set_role() to extcon and otg usecase Xu Yang
2025-12-05 3:29 ` [PATCH v2 2/3] usb: dwc3: imx8mp: rename dwc3 to dwc3_pdev in struct dwc3_imx8mp Xu Yang
2025-12-05 15:12 ` Frank Li
2025-12-16 23:19 ` Thinh Nguyen [this message]
2025-12-05 3:29 ` [PATCH v2 3/3] usb: dwc3: imx8mp: disable auto suspend for host role Xu Yang
2025-12-16 23:26 ` Thinh Nguyen
2026-01-08 8:00 ` Xu Yang
2026-01-09 0:45 ` Thinh Nguyen
2025-12-16 23:18 ` [PATCH v2 1/3] usb: dwc3: drd: extend dwc3_pre_set_role() to extcon and otg usecase Thinh Nguyen
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=20251216231930.o3d3b5lrbeb776ip@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=imx@lists.linux.dev \
--cc=jun.li@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=xu.yang_2@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