Skip to content

Commit

Permalink
usb: dwc2: host: register handle to the phy
Browse files Browse the repository at this point in the history
If phy driver is present register hcd handle to it.

Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Mian Yousaf Kaukab authored and Felipe Balbi committed Apr 29, 2015
1 parent 31bebf4 commit 9df4cea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/usb/dwc2/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2913,6 +2913,9 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq)
/* Don't support SG list at this point */
hcd->self.sg_tablesize = 0;

if (!IS_ERR_OR_NULL(hsotg->uphy))
otg_set_host(hsotg->uphy->otg, &hcd->self);

/*
* Finish generic HCD initialization and start the HCD. This function
* allocates the DMA buffer pool, registers the USB bus, requests the
Expand Down Expand Up @@ -2966,6 +2969,9 @@ void dwc2_hcd_remove(struct dwc2_hsotg *hsotg)
return;
}

if (!IS_ERR_OR_NULL(hsotg->uphy))
otg_set_host(hsotg->uphy->otg, NULL);

usb_remove_hcd(hcd);
hsotg->priv = NULL;
dwc2_hcd_release(hsotg);
Expand Down

0 comments on commit 9df4cea

Please sign in to comment.