1. 17 Oct, 2013 2 commits
    • Sebastian Andrzej Siewior's avatar
      usb: musb: dsps: move try_idle to start hook · 8b9fcce2
      Sebastian Andrzej Siewior authored
      The timer is initialized right after musb is probed. There is actually
      no need to have this timer running because _nothing_ will happen until
      we have the gadget loaded. Also we need this timer only if we run in OTG
      mode _and_ we need it also after the gadget has been replaced with
      another one.
      
      I've been looking at am35x.c, da8xx.c, omap2430.c, tusb6010.c. da8xx
      seem to have the same problem as dsps and doing mostly the same thing.
      tusb6010 seem to do something different and do some actual "idle / power
      saving" work so I am not too comfortable to remove
      musb_platform_try_idle() from musb_gadget_setup().
      
      Therefore this patch does not start the timer if there is no gadget
      active (which is at musb_gadget_setup() at time). In order to have the
      timer active after the gadget is loaded it will be triggered from
      dsps_musb_enable().
      
      Cc: stable@vger.kernel.org # v3.11
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      8b9fcce2
    • Sebastian Andrzej Siewior's avatar
      usb: musb: call musb_start() only once in OTG mode · ae44df2e
      Sebastian Andrzej Siewior authored
      In commit 001dd84a ("usb: musb: start musb on the udc side, too") it was
      ensured that the state engine is started also in OTG mode after a
      removal / insertion of the gadget.
      Unfortunately this change also introduced a bug: If the device is
      configured as OTG and it connected with a remote host _without_ loading
      a gadget then we bug() later (because musb->otg->gadget is not
      initialized).
      Initially I assumed it might be nice to have the host part of musb in
      OTG mode working without having a gadget loaded. This bug and fact that
      it wasn't working like this before the host/gadget split made me realize
      that this was a silly idea.
      This patch now introduces back the old behavior where in OTG mode the
      host mode is only working after the gadget has been loaded.
      
      Cc: stable@vger.kernel.org # v3.11
      Cc: Daniel Mack <zonque@gmail.com>
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      ae44df2e
  2. 15 Oct, 2013 10 commits
  3. 11 Oct, 2013 6 commits
  4. 10 Oct, 2013 22 commits