Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Biju Das and committed by
Greg Kroah-Hartman
2ef16e4e f7acd12e

+15
+14
drivers/usb/host/xhci-plat.c
··· 75 75 return priv->resume_quirk(hcd); 76 76 } 77 77 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 + 78 88 static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci) 79 89 { 80 90 struct xhci_plat_priv *priv = xhci_to_priv(xhci); ··· 537 527 goto disable_clks; 538 528 539 529 ret = xhci_resume(xhci, power_lost || priv->power_lost, false); 530 + if (ret) 531 + goto disable_clks; 532 + 533 + ret = xhci_priv_post_resume_quirk(hcd); 540 534 if (ret) 541 535 goto disable_clks; 542 536
+1
drivers/usb/host/xhci-plat.h
··· 21 21 int (*init_quirk)(struct usb_hcd *); 22 22 int (*suspend_quirk)(struct usb_hcd *); 23 23 int (*resume_quirk)(struct usb_hcd *); 24 + int (*post_resume_quirk)(struct usb_hcd *); 24 25 }; 25 26 26 27 #define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv)