diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2011-07-06 20:58:50 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-07-08 18:08:40 -0400 |
commit | 7eff1d83a3b846d16a4cd706d06b5827a07c08a3 (patch) | |
tree | 1286650f957c812d8810fce68341808ce6e4b703 /drivers | |
parent | bb59dbff4e5fb0ac14e3ee47d3f688490f128155 (diff) |
usb: gadget: m66592-udc: add pullup function
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/m66592-udc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c index 5c9c04d7aa76..491f825ed5c9 100644 --- a/drivers/usb/gadget/m66592-udc.c +++ b/drivers/usb/gadget/m66592-udc.c | |||
@@ -1561,10 +1561,26 @@ static int m66592_get_frame(struct usb_gadget *_gadget) | |||
1561 | return m66592_read(m66592, M66592_FRMNUM) & 0x03FF; | 1561 | return m66592_read(m66592, M66592_FRMNUM) & 0x03FF; |
1562 | } | 1562 | } |
1563 | 1563 | ||
1564 | static int m66592_pullup(struct usb_gadget *gadget, int is_on) | ||
1565 | { | ||
1566 | struct m66592 *m66592 = gadget_to_m66592(gadget); | ||
1567 | unsigned long flags; | ||
1568 | |||
1569 | spin_lock_irqsave(&m66592->lock, flags); | ||
1570 | if (is_on) | ||
1571 | m66592_bset(m66592, M66592_DPRPU, M66592_SYSCFG); | ||
1572 | else | ||
1573 | m66592_bclr(m66592, M66592_DPRPU, M66592_SYSCFG); | ||
1574 | spin_unlock_irqrestore(&m66592->lock, flags); | ||
1575 | |||
1576 | return 0; | ||
1577 | } | ||
1578 | |||
1564 | static struct usb_gadget_ops m66592_gadget_ops = { | 1579 | static struct usb_gadget_ops m66592_gadget_ops = { |
1565 | .get_frame = m66592_get_frame, | 1580 | .get_frame = m66592_get_frame, |
1566 | .start = m66592_start, | 1581 | .start = m66592_start, |
1567 | .stop = m66592_stop, | 1582 | .stop = m66592_stop, |
1583 | .pullup = m66592_pullup, | ||
1568 | }; | 1584 | }; |
1569 | 1585 | ||
1570 | static int __exit m66592_remove(struct platform_device *pdev) | 1586 | static int __exit m66592_remove(struct platform_device *pdev) |