diff options
author | Roger Quadros <rogerq@ti.com> | 2017-04-04 11:25:27 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-04-11 10:58:30 +0300 |
commit | 6b3261a274285916720e91bfbfdb3505555daa76 (patch) | |
tree | 68ba5d32aba4ba46bb016abb488d41fd8543b50e /drivers/usb/dwc3/core.c | |
parent | fac323471df6e196b496f94f7ca2047fa1b18387 (diff) | |
download | linux-6b3261a274285916720e91bfbfdb3505555daa76.tar.gz linux-6b3261a274285916720e91bfbfdb3505555daa76.tar.bz2 linux-6b3261a274285916720e91bfbfdb3505555daa76.zip |
usb: dwc3: core: add current_dr_role member
We're going to use this member to track which role we're currently
playing, that way we can more easily implement dual-role swap in
upcoming patches.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r-- | drivers/usb/dwc3/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 56f136784cd3..68e6a7b6fd81 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -108,6 +108,8 @@ void dwc3_set_mode(struct dwc3 *dwc, u32 mode) reg &= ~(DWC3_GCTL_PRTCAPDIR(DWC3_GCTL_PRTCAP_OTG)); reg |= DWC3_GCTL_PRTCAPDIR(mode); dwc3_writel(dwc->regs, DWC3_GCTL, reg); + + dwc->current_dr_role = mode; } u32 dwc3_core_fifo_space(struct dwc3_ep *dep, u8 type) |