1. 29 6月, 2020 1 次提交
  2. 26 1月, 2019 1 次提交
    • B
      usb: typec: tcpm: Do not disconnect link for self powered devices · 579f3fc1
      Badhri Jagan Sridharan 提交于
      [ Upstream commit 23b5f73266e59a598c1e5dd435d87651b5a7626b ]
      
      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: NBadhri Jagan Sridharan <badhri@google.com>
      Reviewed-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
      ---------
      Version history:
      V3:
      Rebase on top of usb-next
      
      V2:
      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: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      579f3fc1
  3. 27 11月, 2018 1 次提交
    • K
      USB: Wait for extra delay time after USB_PORT_FEAT_RESET for quirky hub · ed8acd13
      Kai-Heng Feng 提交于
      commit 781f0766cc41a9dd2e5d118ef4b1d5d89430257b upstream.
      
      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
      hub.
      Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
      Cc: stable <stable@vger.kernel.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ed8acd13
  4. 31 7月, 2018 1 次提交
    • J
      ALSA: usb-audio: Initial Power Domain support · 11785ef5
      Jorge Sanjuan 提交于
      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: NJorge Sanjuan <jorge.sanjuan@codethink.co.uk>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      11785ef5
  5. 16 7月, 2018 1 次提交
  6. 02 7月, 2018 5 次提交
  7. 28 6月, 2018 4 次提交
  8. 25 6月, 2018 1 次提交
    • A
      USB: Report wakeup events on root-hub ports · 379cacc5
      Alan Stern 提交于
      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: NAlan Stern <stern@rowland.harvard.edu>
      Suggested-by: NAnshuman Gupta <anshuman.gupta@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      379cacc5
  9. 22 5月, 2018 1 次提交
  10. 21 5月, 2018 1 次提交
  11. 15 5月, 2018 4 次提交
  12. 04 5月, 2018 1 次提交
  13. 27 4月, 2018 1 次提交
  14. 25 4月, 2018 1 次提交
  15. 23 4月, 2018 1 次提交
  16. 22 4月, 2018 6 次提交
  17. 26 3月, 2018 2 次提交
  18. 23 3月, 2018 2 次提交
    • A
      ALSA: usb-audio: fix uac control query argument · 21e9b3e9
      Andrew Chant 提交于
      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: NAndrew Chant <achant@google.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      21e9b3e9
    • B
      usb/gadget: Add an EP dispose() callback for EP lifetime tracking · aaeab02d
      Benjamin Herrenschmidt 提交于
      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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      aaeab02d
  19. 22 3月, 2018 5 次提交