mirror of
https://github.com/torvalds/linux.git
synced 2025-04-12 16:47:42 +00:00
usb: host: xhci-plat: allow upper layers to signal power loss
Now that xhci_resume() exposes a power_lost boolean argument, expose that to all xhci-plat implementations. They are free to set it from wherever they want: - Their own resume() callback. - The xhci_plat_priv::resume_quirk() callback. Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Link: https://lore.kernel.org/r/20250205-s2r-cdns-v7-8-13658a271c3c@bootlin.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
34cca0ceab
commit
668cc6bc11
@ -482,6 +482,7 @@ static int xhci_plat_suspend(struct device *dev)
|
||||
static int xhci_plat_resume_common(struct device *dev, bool power_lost)
|
||||
{
|
||||
struct usb_hcd *hcd = dev_get_drvdata(dev);
|
||||
struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
|
||||
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
|
||||
int ret;
|
||||
|
||||
@ -501,7 +502,7 @@ static int xhci_plat_resume_common(struct device *dev, bool power_lost)
|
||||
if (ret)
|
||||
goto disable_clks;
|
||||
|
||||
ret = xhci_resume(xhci, power_lost, false);
|
||||
ret = xhci_resume(xhci, power_lost || priv->power_lost, false);
|
||||
if (ret)
|
||||
goto disable_clks;
|
||||
|
||||
|
@ -15,6 +15,7 @@ struct usb_hcd;
|
||||
struct xhci_plat_priv {
|
||||
const char *firmware_name;
|
||||
unsigned long long quirks;
|
||||
bool power_lost;
|
||||
void (*plat_start)(struct usb_hcd *);
|
||||
int (*init_quirk)(struct usb_hcd *);
|
||||
int (*suspend_quirk)(struct usb_hcd *);
|
||||
|
Loading…
x
Reference in New Issue
Block a user