提交 99a65798 编写于 作者: G Gregory Herrero 提交者: Felipe Balbi

usb: dwc2: host: add bus_suspend/bus_resume callback

Update controller state to indicate suspend entry.
Acked-by: NJohn Youn <johnyoun@synopsys.com>
Signed-off-by: NGregory Herrero <gregory.herrero@intel.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 9df4ceac
...@@ -2313,6 +2313,22 @@ static void _dwc2_hcd_stop(struct usb_hcd *hcd) ...@@ -2313,6 +2313,22 @@ static void _dwc2_hcd_stop(struct usb_hcd *hcd)
usleep_range(1000, 3000); usleep_range(1000, 3000);
} }
static int _dwc2_hcd_suspend(struct usb_hcd *hcd)
{
struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd);
hsotg->lx_state = DWC2_L2;
return 0;
}
static int _dwc2_hcd_resume(struct usb_hcd *hcd)
{
struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd);
hsotg->lx_state = DWC2_L0;
return 0;
}
/* Returns the current frame number */ /* Returns the current frame number */
static int _dwc2_hcd_get_frame_number(struct usb_hcd *hcd) static int _dwc2_hcd_get_frame_number(struct usb_hcd *hcd)
{ {
...@@ -2683,6 +2699,9 @@ static struct hc_driver dwc2_hc_driver = { ...@@ -2683,6 +2699,9 @@ static struct hc_driver dwc2_hc_driver = {
.hub_status_data = _dwc2_hcd_hub_status_data, .hub_status_data = _dwc2_hcd_hub_status_data,
.hub_control = _dwc2_hcd_hub_control, .hub_control = _dwc2_hcd_hub_control,
.clear_tt_buffer_complete = _dwc2_hcd_clear_tt_buffer_complete, .clear_tt_buffer_complete = _dwc2_hcd_clear_tt_buffer_complete,
.bus_suspend = _dwc2_hcd_suspend,
.bus_resume = _dwc2_hcd_resume,
}; };
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册