Skip to content

Commit

Permalink
usb: dwc2: Add call_gadget() function call
Browse files Browse the repository at this point in the history
Added call_gadget() function call when entering to L1 state
to inform gadget that core is in L1 state.

Did the same thing when exiting from L1 state
to inform gadget that core is in L0 state.

Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
  • Loading branch information
Grigor Tovmasyan authored and Felipe Balbi committed Mar 13, 2018
1 parent 21b0340 commit c655557
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/usb/dwc2/core_intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ static void dwc2_wakeup_from_lpm_l1(struct dwc2_hsotg *hsotg)

/* Change to L0 state */
hsotg->lx_state = DWC2_L0;

/* Inform gadget to exit from L1 */
call_gadget(hsotg, resume);
}

/*
Expand Down Expand Up @@ -589,6 +592,9 @@ static void dwc2_handle_lpm_intr(struct dwc2_hsotg *hsotg)
hsotg->lx_state = DWC2_L1;
dev_dbg(hsotg->dev,
"Core is in L1 sleep glpmcfg=%08x\n", glpmcfg);

/* Inform gadget that we are in L1 state */
call_gadget(hsotg, suspend);
}
}
}
Expand Down

0 comments on commit c655557

Please sign in to comment.