Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280850
b: refs/heads/master
c: 712d8ef
h: refs/heads/master
v: v3
  • Loading branch information
Vikram Pandita authored and Felipe Balbi committed Dec 12, 2011
1 parent 5257635 commit 58e38ab
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 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: 1e546aa6c4cfe83050fc78487c8aa78b6947006c
refs/heads/master: 712d8efafbbcbe617f9ad706f6ca1ffea4bbf2e8
2 changes: 2 additions & 0 deletions trunk/drivers/usb/musb/musb_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ struct musb {

irqreturn_t (*isr)(int, void *);
struct work_struct irq_work;
struct work_struct otg_notifier_work;
u16 hwvers;

/* this hub status bit is reserved by USB 2.0 and not seen by usbcore */
Expand Down Expand Up @@ -372,6 +373,7 @@ struct musb {
u16 int_tx;

struct otg_transceiver *xceiv;
u8 xceiv_event;

int nIrq;
unsigned irq_wake:1;
Expand Down
14 changes: 13 additions & 1 deletion trunk/drivers/usb/musb/omap2430.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,21 @@ static int musb_otg_notifications(struct notifier_block *nb,
unsigned long event, void *unused)
{
struct musb *musb = container_of(nb, struct musb, nb);

musb->xceiv_event = event;
schedule_work(&musb->otg_notifier_work);

return 0;
}

static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
{
struct musb *musb = container_of(data_notifier_work, struct musb, otg_notifier_work);
struct device *dev = musb->controller;
struct musb_hdrc_platform_data *pdata = dev->platform_data;
struct omap_musb_board_data *data = pdata->board_data;

switch (event) {
switch (musb->xceiv_event) {
case USB_EVENT_ID:
dev_dbg(musb->controller, "ID GND\n");

Expand Down Expand Up @@ -296,6 +306,8 @@ static int omap2430_musb_init(struct musb *musb)
return -ENODEV;
}

INIT_WORK(&musb->otg_notifier_work, musb_otg_notifier_work);

status = pm_runtime_get_sync(dev);
if (status < 0) {
dev_err(dev, "pm_runtime_get_sync FAILED");
Expand Down

0 comments on commit 58e38ab

Please sign in to comment.