Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259305
b: refs/heads/master
c: 8ca1375
h: refs/heads/master
i:
  259303: ebf6254
v: v3
  • Loading branch information
Yoshihiro Shimoda authored and Felipe Balbi committed Jul 8, 2011
1 parent 54d3100 commit dc1b18e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57c97c02de0e7a59cb48d3d7666f4afaf9968e84
refs/heads/master: 8ca137562a79f573f822f5a84a4e56a0d8cc6792
16 changes: 16 additions & 0 deletions trunk/drivers/usb/gadget/r8a66597-udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1518,10 +1518,26 @@ static int r8a66597_get_frame(struct usb_gadget *_gadget)
return r8a66597_read(r8a66597, FRMNUM) & 0x03FF;
}

static int r8a66597_pullup(struct usb_gadget *gadget, int is_on)
{
struct r8a66597 *r8a66597 = gadget_to_r8a66597(gadget);
unsigned long flags;

spin_lock_irqsave(&r8a66597->lock, flags);
if (is_on)
r8a66597_bset(r8a66597, DPRPU, SYSCFG0);
else
r8a66597_bclr(r8a66597, DPRPU, SYSCFG0);
spin_unlock_irqrestore(&r8a66597->lock, flags);

return 0;
}

static struct usb_gadget_ops r8a66597_gadget_ops = {
.get_frame = r8a66597_get_frame,
.start = r8a66597_start,
.stop = r8a66597_stop,
.pullup = r8a66597_pullup,
};

static int __exit r8a66597_remove(struct platform_device *pdev)
Expand Down

0 comments on commit dc1b18e

Please sign in to comment.