1. 26 Jan, 2019 1 commit
    • Badhri Jagan Sridharan's avatar
      usb: typec: tcpm: Do not disconnect link for self powered devices · 5fca7488
      Badhri Jagan Sridharan authored
      [ Upstream commit 23b5f732 ]
      During HARD_RESET the data link is disconnected.
      For self powered device, the spec is advising against doing that.
      >From USB_PD_R3_0
      7.1.5 Response to Hard Resets
      Device operation during and after a Hard Reset is defined as follows:
      Self-powered devices Should Not disconnect from USB during a Hard Reset
      (see Section 9.1.2).
      Bus powered devices will disconnect from USB during a Hard Reset due to the
      loss of their power source.
      Tackle this by letting TCPM know whether the device is self or bus powered.
      This overcomes unnecessary port disconnections from hard reset.
      Also, speeds up the enumeration time when connected to Type-A ports.
      Signed-off-by: default avatarBadhri Jagan Sridharan <badhri@google.com>
      Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Version history:
      Rebase on top of usb-next
      Based on feedback from heikki.krogerus@linux.intel.com
      - self_powered added to the struct tcpm_port which is populated from
        a. "connector" node of the device tree in tcpm_fw_get_caps()
        b. "self_powered" node of the tcpc_config in tcpm_copy_caps
      Based on feedbase from linux@roeck-us.net
      - Code was refactored
      - SRC_HARD_RESET_VBUS_OFF sets the link state to false based
        on self_powered flag
      V1 located here:
      https://lkml.org/lkml/2018/9/13/94Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
  2. 07 Nov, 2018 1 commit
    • Kai-Heng Feng's avatar
      USB: Wait for extra delay time after USB_PORT_FEAT_RESET for quirky hub · 781f0766
      Kai-Heng Feng authored
      Devices connected under Terminus Technology Inc. Hub (1a40:0101) may
      fail to work after the system resumes from suspend:
      [  206.063325] usb 3-2.4: reset full-speed USB device number 4 using xhci_hcd
      [  206.143691] usb 3-2.4: device descriptor read/64, error -32
      [  206.351671] usb 3-2.4: device descriptor read/64, error -32
      Info for this hub:
      T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=480 MxCh= 4
      D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=1a40 ProdID=0101 Rev=01.11
      S:  Product=USB 2.0 Hub
      C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
      I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
      Some expirements indicate that the USB devices connected to the hub are
      innocent, it's the hub itself is to blame. The hub needs extra delay
      time after it resets its port.
      Hence wait for extra delay, if the device is connected to this quirky
      Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Cc: stable <stable@vger.kernel.org>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  3. 13 Oct, 2018 1 commit
  4. 03 Oct, 2018 1 commit
  5. 20 Sep, 2018 1 commit
    • Loic Poulain's avatar
      usb: chipidea: Add dynamic pinctrl selection · 16caf1fa
      Loic Poulain authored
      Some hardware implementations require to configure pins differently
      according to the USB role (host/device), this can be an update of the
      pins routing or a simple GPIO value change.
      This patch introduces new optional "host" and "device" pinctrls.
      If these pinctrls are defined by the device, they are respectively
      selected on host/device role start.
      If a default pinctrl exist, it is restored on host/device role stop.
      Signed-off-by: default avatarLoic Poulain <loic.poulain@linaro.org>
      Signed-off-by: default avatarPeter Chen <peter.chen@nxp.com>
  6. 31 Jul, 2018 1 commit
    • Jorge Sanjuan's avatar
      ALSA: usb-audio: Initial Power Domain support · 11785ef5
      Jorge Sanjuan authored
      Thee USB Audio Class 3 (UAC3) introduces Power Domains as a new
      feature to let a host turn individual parts of an audio function
      to different power states via USB requests. This lets the device
      get to know a bit amore about what the host is up to in order to
      optimize power consumption efficiently.
      The Power Domains are optional for UAC3 configuration but all
      UAC3 devices shall include at least one BADD configuration where
      the support for Power Domains is compulsory.
      This patch adds a set of features/helpers to parse these power
      domains and change their status.
      Signed-off-by: Jorge Sanjuan's avatarJorge Sanjuan <jorge.sanjuan@codethink.co.uk>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  7. 16 Jul, 2018 1 commit
  8. 02 Jul, 2018 5 commits
  9. 28 Jun, 2018 4 commits
  10. 25 Jun, 2018 1 commit
    • Alan Stern's avatar
      USB: Report wakeup events on root-hub ports · 379cacc5
      Alan Stern authored
      When a USB device attached to a root-hub port sends a wakeup request
      to a sleeping system, we do not report the wakeup event to the PM
      core.  This is because a system resume involves waking up all
      suspended USB ports as quickly as possible; without the normal
      USB_RESUME_TIMEOUT delay, the host controller driver doesn't set the
      USB_PORT_STAT_C_SUSPEND flag and so usb_port_resume() doesn't realize
      that a wakeup request was received.
      However, some environments (such as Chrome OS) want to have all wakeup
      events reported so they can be ascribed to the appropriate device.  To
      accommodate these environments, this patch adds a new routine to the
      hub driver and a corresponding new HCD method to be used when a root
      hub resumes.  The HCD method returns a bitmap of ports that have
      initiated a wakeup signal but not yet completed resuming.  The hub
      driver can then report to the PM core that the child devices attached
      to these ports initiated a wakeup event.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Suggested-by: default avatarAnshuman Gupta <anshuman.gupta@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  11. 22 May, 2018 1 commit
  12. 21 May, 2018 1 commit
  13. 15 May, 2018 4 commits
  14. 04 May, 2018 1 commit
  15. 27 Apr, 2018 1 commit
  16. 25 Apr, 2018 1 commit
  17. 23 Apr, 2018 1 commit
  18. 22 Apr, 2018 6 commits
  19. 26 Mar, 2018 2 commits
  20. 23 Mar, 2018 2 commits
    • Andrew Chant's avatar
      ALSA: usb-audio: fix uac control query argument · 21e9b3e9
      Andrew Chant authored
      This patch fixes code readability and should have no functional change.
      Correct uac control query functions to account for the 1-based indexing
      of USB Audio Class control identifiers.
      The function parameter, u8 control, should be the
      constant defined in audio-v2.h to identify the control to be checked for
      readability or writeability.
      This patch fixes all callers that had adjusted, and makes explicit
      the mapping between audio_feature_info[] array index and the associated
      control identifier.
      Signed-off-by: default avatarAndrew Chant <achant@google.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    • Benjamin Herrenschmidt's avatar
      usb/gadget: Add an EP dispose() callback for EP lifetime tracking · aaeab02d
      Benjamin Herrenschmidt authored
      Some UDC may want to allocate endpoints dynamically, either because
      the HW supports an arbitrary large number or because (like the Aspeed
      BMC SoCs), the pool of HW endpoints is shared between multiple gadgets.
      The allocation side can be done rather easily using the existing
      match_ep() UDC hook.
      However we have no good place to "free" them.
      This implements a "simple" variant of this, which calls an EP dispose
      callback on all EPs associated with a gadget when the composite device
      gets unbound.
      This is required by my upcoming Aspeed vHub driver.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
  21. 22 Mar, 2018 3 commits