diff options
author | Antoine Tenart <antoine.tenart@free-electrons.com> | 2014-10-30 20:41:16 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-03 19:02:50 +0300 |
commit | ef44cb4226d132146e44f8ea562a16b27ff61126 (patch) | |
tree | cec7cf8bd69f400de0fbdb76e6a43759a154d446 /drivers/usb/chipidea/udc.c | |
parent | 48bcc18076df4e07ef86226ac6ce795f64c84f7f (diff) | |
download | linux-ef44cb4226d132146e44f8ea562a16b27ff61126.tar.xz |
usb: allow to supply the PHY in the drivers when using HCD
This patch modify the generic code handling PHYs to allow them to be
supplied from the drivers. This adds checks to ensure no PHY was already
there when looking for one in the generic code. This also makes sure we
do not modify its state in the generic HCD functions, it was provided by
the driver.
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/chipidea/udc.c')
-rw-r--r-- | drivers/usb/chipidea/udc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index f4397b29891f..a2d80ab3d9c4 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1519,8 +1519,8 @@ static int ci_udc_vbus_draw(struct usb_gadget *_gadget, unsigned ma) { struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget); - if (ci->transceiver) - return usb_phy_set_power(ci->transceiver, ma); + if (ci->usb_phy) + return usb_phy_set_power(ci->usb_phy, ma); return -ENOTSUPP; } |