Skip to content

Commit 2ef16e4

Browse files
bijudasgregkh
authored andcommitted
usb: host: xhci-plat: Add .post_resume_quirk for struct xhci_plat_priv
Some SoCs (eg Renesas RZ/G3E SoC) have special sequence after xhci_resume, add .post_resume_quick for it. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20250916150255.4231-6-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f7acd12 commit 2ef16e4

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

drivers/usb/host/xhci-plat.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ static int xhci_priv_resume_quirk(struct usb_hcd *hcd)
7575
return priv->resume_quirk(hcd);
7676
}
7777

78+
static int xhci_priv_post_resume_quirk(struct usb_hcd *hcd)
79+
{
80+
struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
81+
82+
if (!priv->post_resume_quirk)
83+
return 0;
84+
85+
return priv->post_resume_quirk(hcd);
86+
}
87+
7888
static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
7989
{
8090
struct xhci_plat_priv *priv = xhci_to_priv(xhci);
@@ -530,6 +540,10 @@ static int xhci_plat_resume_common(struct device *dev, bool power_lost)
530540
if (ret)
531541
goto disable_clks;
532542

543+
ret = xhci_priv_post_resume_quirk(hcd);
544+
if (ret)
545+
goto disable_clks;
546+
533547
pm_runtime_disable(dev);
534548
pm_runtime_set_active(dev);
535549
pm_runtime_enable(dev);

drivers/usb/host/xhci-plat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ struct xhci_plat_priv {
2121
int (*init_quirk)(struct usb_hcd *);
2222
int (*suspend_quirk)(struct usb_hcd *);
2323
int (*resume_quirk)(struct usb_hcd *);
24+
int (*post_resume_quirk)(struct usb_hcd *);
2425
};
2526

2627
#define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv)

0 commit comments

Comments
 (0)