diff options
author | kuninori.morimoto.gx@renesas.com <kuninori.morimoto.gx@renesas.com> | 2012-10-16 06:24:19 (GMT) |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-10-16 10:09:50 (GMT) |
commit | 4cd2f5998757a41038deb55a0cb8319bdf67575a (patch) | |
tree | 081ee4cedaea1ceedb4e7d524d50b978d55966fc /drivers/usb/renesas_usbhs/mod_gadget.c | |
parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) | |
download | linux-fsl-qoriq-4cd2f5998757a41038deb55a0cb8319bdf67575a.tar.xz |
usb: renesas_usbhs: gadget: add usb_gadget_ops :: pullup support
This patch adds usbhs_sys_function_pullup() to control
D+ line for USB function, and enabled pullup support on mod_gadget.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs/mod_gadget.c')
-rw-r--r-- | drivers/usb/renesas_usbhs/mod_gadget.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index 28478ce..dd41f61 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c @@ -883,6 +883,16 @@ static int usbhsg_get_frame(struct usb_gadget *gadget) return usbhs_frame_get_num(priv); } +static int usbhsg_pullup(struct usb_gadget *gadget, int is_on) +{ + struct usbhsg_gpriv *gpriv = usbhsg_gadget_to_gpriv(gadget); + struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv); + + usbhs_sys_function_pullup(priv, is_on); + + return 0; +} + static int usbhsg_set_selfpowered(struct usb_gadget *gadget, int is_self) { struct usbhsg_gpriv *gpriv = usbhsg_gadget_to_gpriv(gadget); @@ -900,6 +910,7 @@ static struct usb_gadget_ops usbhsg_gadget_ops = { .set_selfpowered = usbhsg_set_selfpowered, .udc_start = usbhsg_gadget_start, .udc_stop = usbhsg_gadget_stop, + .pullup = usbhsg_pullup, }; static int usbhsg_start(struct usbhs_priv *priv) |