Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326008
b: refs/heads/master
c: b183c19
h: refs/heads/master
v: v3
  • Loading branch information
Richard Zhao authored and Greg Kroah-Hartman committed Sep 12, 2012
1 parent 47f04c2 commit a346b84
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 388ed487234429652c1cdb797ad45cb0967b2343
refs/heads/master: b183c19f98f8afee799ee41e062810d6b1c7e123
21 changes: 13 additions & 8 deletions trunk/drivers/usb/chipidea/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ static void ci_role_work(struct work_struct *work)

ci_role_stop(ci);
ci_role_start(ci, role);
enable_irq(ci->irq);
}
}

Expand Down Expand Up @@ -318,18 +319,22 @@ static irqreturn_t ci_irq(int irq, void *data)
{
struct ci13xxx *ci = data;
irqreturn_t ret = IRQ_NONE;
u32 otgsc = 0;

if (ci->is_otg) {
u32 sts = hw_read(ci, OP_OTGSC, ~0);
if (ci->is_otg)
otgsc = hw_read(ci, OP_OTGSC, ~0);

if (ci->role != CI_ROLE_END)
ret = ci_role(ci)->irq(ci);

if (sts & OTGSC_IDIS) {
hw_write(ci, OP_OTGSC, OTGSC_IDIS, OTGSC_IDIS);
queue_work(ci->wq, &ci->work);
ret = IRQ_HANDLED;
}
if (ci->is_otg && (otgsc & OTGSC_IDIS)) {
hw_write(ci, OP_OTGSC, OTGSC_IDIS, OTGSC_IDIS);
disable_irq_nosync(ci->irq);
queue_work(ci->wq, &ci->work);
ret = IRQ_HANDLED;
}

return ci->role == CI_ROLE_END ? ret : ci_role(ci)->irq(ci);
return ret;
}

static DEFINE_IDA(ci_ida);
Expand Down

0 comments on commit a346b84

Please sign in to comment.