From: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org,
linux-phy@lists.infradead.org, kernel@collabora.com,
Igor Paunovic <royalnet026@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Heiko Stuebner <heiko@sntech.de>, Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Manivannan Sadhasivam <mani@kernel.org>
Subject: Re: [PATCH 3/5] usb: dwc3: core: add post PHY registration hook for platform glue
Date: Wed, 23 Sep 2026 11:24:08 +0530 [thread overview]
Message-ID: <f4b3fb1e-4628-43c5-97da-8af96da4d642@oss.qualcomm.com> (raw)
In-Reply-To: <20260915-b4-rockchip-dwc3-rockchip-glue-v1-3-763bb546824e@collabora.com>
On 9/15/2026 8:47 PM, Sebastian Reichel wrote:
> Add support for custom PHY handling steps in platform glue code
> by adding a post registration hook. This will be used for handling
> PHY reset notifications on the Rockchip platform.
>
> Tested-by: Igor Paunovic <royalnet026@gmail.com> # Orange Pi 5 Plus
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
> ---
> drivers/usb/dwc3/core.c | 2 +-
> drivers/usb/dwc3/core.h | 9 +++++++++
> 2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 4b7132887a03..daf5aec07fbf 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -1613,7 +1613,7 @@ static int dwc3_core_get_phy(struct dwc3 *dwc)
> }
> }
>
> - return 0;
> + return dwc3_post_phy_registration(dwc);
> }
>
> static int dwc3_core_init_mode(struct dwc3 *dwc)
> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
> index 608daeb7ef10..e9d8df0a298e 100644
> --- a/drivers/usb/dwc3/core.h
> +++ b/drivers/usb/dwc3/core.h
> @@ -995,10 +995,12 @@ struct dwc3_scratchpad_array {
> * need to be passed on to glue layer
> * @pre_set_role: Notify glue of role switch notifications
> * @pre_run_stop: Notify run stop enable/disable information to glue
> + * @post_phy_registration: Called directly after PHY got registered
> */
> struct dwc3_glue_ops {
> void (*pre_set_role)(struct dwc3 *dwc, enum usb_role role);
> void (*pre_run_stop)(struct dwc3 *dwc, bool is_on);
> + int (*post_phy_registration)(struct dwc3 *dwc);
> };
>
> /**
> @@ -1655,6 +1657,13 @@ static inline void dwc3_pre_run_stop(struct dwc3 *dwc, bool is_on)
> dwc->glue_ops->pre_run_stop(dwc, is_on);
> }
>
> +static inline int dwc3_post_phy_registration(struct dwc3 *dwc)
> +{
> + if (dwc->glue_ops && dwc->glue_ops->post_phy_registration)
> + return dwc->glue_ops->post_phy_registration(dwc);
> + return 0;
> +}
> +
> #if IS_ENABLED(CONFIG_USB_DWC3_HOST) || IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE)
> int dwc3_host_init(struct dwc3 *dwc);
> void dwc3_host_exit(struct dwc3 *dwc);
>
next prev parent reply other threads:[~2026-09-23 5:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 15:17 [PATCH 0/5] usb: dwc3: introduce Rockchip glue driver Sebastian Reichel
2026-09-15 15:17 ` [PATCH 1/5] phy: core: add notifier infrastructure Sebastian Reichel
2026-09-15 15:17 ` [PATCH 2/5] usb: dwc3: rockchip: introduce glue driver Sebastian Reichel
2026-09-23 1:31 ` Thinh Nguyen
2026-09-23 5:53 ` Krishna Kurapati
2026-09-15 15:17 ` [PATCH 3/5] usb: dwc3: core: add post PHY registration hook for platform glue Sebastian Reichel
2026-09-23 1:48 ` Thinh Nguyen
2026-09-23 5:54 ` Krishna Kurapati [this message]
2026-09-15 15:17 ` [PATCH 4/5] usb: dwc3: rockchip: support PHY reset notifications Sebastian Reichel
2026-09-23 1:56 ` Thinh Nguyen
2026-09-15 15:17 ` [PATCH 5/5] usb: dwc3: rockchip: fix USB-C reconnect in gadget mode Sebastian Reichel
2026-09-18 9:10 ` Igor Paunovic
2026-09-23 1:58 ` Thinh Nguyen
2026-09-23 8:59 ` Igor Paunovic
2026-09-24 1:47 ` 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=f4b3fb1e-4628-43c5-97da-8af96da4d642@oss.qualcomm.com \
--to=krishna.kurapati@oss.qualcomm.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=mani@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=royalnet026@gmail.com \
--cc=sebastian.reichel@collabora.com \
--cc=vkoul@kernel.org \
/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
all inboxes | Powered by JetHome®