mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 03:06:43 +07:00
usb: ehci-orion: add S2RAM support
Add suspend/resume callbacks to reset the host controller properly during S2RAM operation. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e04585184d
commit
f91649c525
@ -182,6 +182,23 @@ static int ehci_orion_drv_reset(struct usb_hcd *hcd)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int __maybe_unused ehci_orion_drv_suspend(struct device *dev)
|
||||||
|
{
|
||||||
|
struct usb_hcd *hcd = dev_get_drvdata(dev);
|
||||||
|
|
||||||
|
return ehci_suspend(hcd, device_may_wakeup(dev));
|
||||||
|
}
|
||||||
|
|
||||||
|
static int __maybe_unused ehci_orion_drv_resume(struct device *dev)
|
||||||
|
{
|
||||||
|
struct usb_hcd *hcd = dev_get_drvdata(dev);
|
||||||
|
|
||||||
|
return ehci_resume(hcd, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
static SIMPLE_DEV_PM_OPS(ehci_orion_pm_ops, ehci_orion_drv_suspend,
|
||||||
|
ehci_orion_drv_resume);
|
||||||
|
|
||||||
static const struct ehci_driver_overrides orion_overrides __initconst = {
|
static const struct ehci_driver_overrides orion_overrides __initconst = {
|
||||||
.extra_priv_size = sizeof(struct orion_ehci_hcd),
|
.extra_priv_size = sizeof(struct orion_ehci_hcd),
|
||||||
.reset = ehci_orion_drv_reset,
|
.reset = ehci_orion_drv_reset,
|
||||||
@ -334,6 +351,7 @@ static struct platform_driver ehci_orion_driver = {
|
|||||||
.driver = {
|
.driver = {
|
||||||
.name = "orion-ehci",
|
.name = "orion-ehci",
|
||||||
.of_match_table = ehci_orion_dt_ids,
|
.of_match_table = ehci_orion_dt_ids,
|
||||||
|
.pm = &ehci_orion_pm_ops,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user