1. 02 May, 2019 1 commit
  2. 01 May, 2019 1 commit
    • Gustavo A. R. Silva's avatar
      usb: isp1760-hcd: Fix fall-through annotations · ce64cea4
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      This patch fixes the following warning:
      
      drivers/usb/isp1760/isp1760-hcd.c: In function ‘collect_qtds’:
      drivers/usb/isp1760/isp1760-hcd.c:788:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
            mem_reads8(hcd->regs, qtd->payload_addr,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              qtd->data_buffer,
              ~~~~~~~~~~~~~~~~~
              qtd->actual_length);
              ~~~~~~~~~~~~~~~~~~~
      drivers/usb/isp1760/isp1760-hcd.c:792:5: note: here
           case OUT_PID:
           ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      Notice that, in this particular case, the code comments are modified
      in accordance with what GCC is expecting to find.
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ce64cea4
  3. 30 Apr, 2019 9 commits
  4. 29 Apr, 2019 5 commits
  5. 27 Apr, 2019 5 commits
  6. 25 Apr, 2019 12 commits
    • Raul E Rangel's avatar
      usb/hcd: Send a uevent signaling that the host controller had died · a4d6a298
      Raul E Rangel authored
      This change will send an OFFLINE event to udev with the ERROR=DEAD
      environment variable set when the HC dies.
      
      By notifying user space the appropriate policies can be applied.
      i.e.,
       * Collect error logs.
       * Notify the user that USB is no longer functional.
       * Perform a graceful reboot.
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarRaul E Rangel <rrangel@chromium.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a4d6a298
    • Ajay Gupta's avatar
      usb: typec: Add driver for NVIDIA Alt Modes · cf28369c
      Ajay Gupta authored
      Latest NVIDIA GPUs support VirtualLink device. Since USBIF
      has not assigned a Standard ID (SID) for VirtualLink
      so using NVIDA VID 0x955 as SVID.
      Signed-off-by: default avatarAjay Gupta <ajayg@nvidia.com>
      Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cf28369c
    • Ajay Gupta's avatar
      usb: typec: displayport: Export probe and remove functions · d266e968
      Ajay Gupta authored
      VirtualLink standard extends the DisplayPort Alt Mode by
      utilizing also the USB 2 pins on the USB Type-C connector.
      It uses the same messages as DisplayPort, but not the DP
      SVID. At the time of writing, USB IF has not assigned a
      Standard ID (SID) for VirtualLink, so the manufacturers of
      VirtualLink adapters use their Vendor IDs as the SVID.
      
      Since the SVID specific communication is exactly the same as
      with DisplayPort alternate mode, there is no need to
      implement separate driver for VirtualLink. We'll handle the
      current VirtualLink adapters with probe drivers, and once
      there is SVID assigned for it, we add it to the displayport
      alt mode driver.
      
      To support probing drivers, exporting the probe and remove
      functions, and also changing the DP_HEADER helper macro to
      use the SVID of the alternate mode device instead of the
      DisplayPort alt mode SVID.
      Suggested-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarAjay Gupta <ajayg@nvidia.com>
      Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d266e968
    • Heikki Krogerus's avatar
      usb: typec: ucsi: Support for DisplayPort alt mode · af8622f6
      Heikki Krogerus authored
      This makes it possible to bind a driver to a DisplayPort
      alt mode adapter devices.
      
      The driver attempts to cope with the limitations of UCSI by
      "emulating" behaviour and attempting to guess things when
      ever possible in order to satisfy the requirements the
      standard DisplayPort alt mode driver has.
      Tested-by: default avatarAjay Gupta <ajayg@nvidia.com>
      Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      af8622f6
    • Heikki Krogerus's avatar
      usb: typec: ucsi: Preliminary support for alternate modes · ad74b864
      Heikki Krogerus authored
      With UCSI the alternate modes, just like everything else
      related to USB Type-C connectors, are handled in firmware.
      The operating system can see the status and is allowed to
      request certain things, for example entering and exiting the
      modes, but the support for alternate modes is very limited
      in UCSI. The feature is also optional, which means that even
      when the platform supports alternate modes, the operating
      system may not be even made aware of them.
      
      UCSI does not support direct VDM reading or writing.
      Instead, alternate modes can be entered and exited using a
      single custom command which takes also an optional SVID
      specific configuration value as parameter. That means every
      supported alternate mode has to be handled separately in
      UCSI driver.
      
      This commit does not include support for any specific
      alternate mode. The discovered alternate modes are now
      registered, but binding a driver to an alternate mode will
      not be possible until support for that alternate mode is
      added to the UCSI driver.
      Tested-by: default avatarAjay Gupta <ajayg@nvidia.com>
      Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ad74b864
    • Ajay Gupta's avatar
      usb: typec: ucsi: ccg: add firmware flashing support · 5c9ae5a8
      Ajay Gupta authored
      CCGx has two copies of the firmware in addition to the bootloader.
      If the device is running FW1, FW2 can be updated with the new version.
      Dual firmware mode allows the CCG device to stay in a PD contract and
      support USB PD and Type-C functionality while a firmware update is in
      progress.
      
      First we read the currently flashed firmware version of both
      primary and secondary firmware and then compare it with
      version of firmware file to determine if flashing is required.
      
      Command framework is added to support sending commands to CCGx
      controller. We wait for response after sending the command and then
      read the response from RAB_RESPONSE register.
      
      Below commands are supported,
      	- ENTER_FLASHING
      	- RESET
      	- PDPORT_ENABLE
      	- JUMP_TO_BOOT
      	- FLASH_ROW_RW
      	- VALIDATE_FW
      
      Command specific mutex lock is also added to sync between driver
      and user threads.
      
      PD port number information is added which is required while sending
      PD_PORT_ENABLE command
      Signed-off-by: default avatarAjay Gupta <ajayg@nvidia.com>
      [ heikki: Added ABI documentation. ]
      Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5c9ae5a8
    • Ajay Gupta's avatar
      i2c: nvidia-gpu: Supply CCGx driver the fw build info · 5fd958a4
      Ajay Gupta authored
      Adding device property "ccgx,firmware-build" for the CCGx
      device, so the CCGx driver knows which firmware binary to
      use for a specific vendor.
      Suggested-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarAjay Gupta <ajayg@nvidia.com>
      Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5fd958a4
    • Ajay Gupta's avatar
      usb: typec: ucsi: ccg: add get_fw_info function · 5d438e20
      Ajay Gupta authored
      Function is to get the details of ccg firmware and device version.
      It will be useful in debugging and also during firmware update.
      Signed-off-by: default avatarAjay Gupta <ajayg@nvidia.com>
      Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5d438e20
    • Serge Semin's avatar
      usb: usb251xb: Lock i2c-bus segment the hub resides · 6e3c8beb
      Serge Semin authored
      SMBus slave configuration is activated by CFG_SEL[1:0]=0x1 pins
      state. This is the mode the hub is supposed to be to let this driver
      work correctly. But a race condition might happen right after reset
      is cleared due to CFG_SEL[0] pin being multiplexed with SMBus SCL
      function. In case if the reset pin is handled by a i2c GPIO expander,
      which is also placed at the same i2c-bus segment as the usb251x
      SMB-interface connected to, then the hub reset clearance might
      cause the CFG_SEL[0] being latched in unpredictable state. So
      sometimes the hub configuration mode might be 0x1 (as expected),
      but sometimes being 0x0, which doesn't imply to have the hub SMBus-slave
      interface activated and consequently causes this driver failure.
      
      In order to fix the problem we must make sure the GPIO-reset chip doesn't
      reside the same i2c-bus segment as the SMBus-interface of the hub. If
      it doesn't, we can safely block the segment for the time the reset is
      cleared to prevent anyone generating a traffic at the i2c-bus SCL lane
      connected to the CFG_SEL[0] pin. But if it does, nothing we can do, so
      just return an error. If we locked the i2c-bus segment and tried to
      communicate with the GPIO-expander, it would cause a deadlock. If we didn't
      lock the i2c-bus segment, it would randomly cause the CFG_SEL[0] bit flip.
      Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6e3c8beb
    • Marc Gonzalez's avatar
      usb: dwc3: Allow building USB_DWC3_QCOM without EXTCON · 77a49465
      Marc Gonzalez authored
      Keep EXTCON support optional, as some platforms do not need it.
      
      Do the same for USB_DWC3_OMAP while we're at it.
      
      Fixes: 3def4031 ("usb: dwc3: add EXTCON dependency for qcom")
      Signed-off-by: default avatarMarc Gonzalez <marc.w.gonzalez@free.fr>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      77a49465
    • Dan Carpenter's avatar
      usbip: stub_rx: tidy the indenting in is_clear_halt_cmd() · 409fba22
      Dan Carpenter authored
      There is an extra space character before the return statement.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      409fba22
    • Greg Kroah-Hartman's avatar
      Merge tag 'phy-for-5.2' of... · d30e413f
      Greg Kroah-Hartman authored
      Merge tag 'phy-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next
      
      Kishon writes:
      
      phy: for 5.2
      
        *) Add a new *release* phy_ops invoked when the consumer relinquishes PHY
           that can be used to undo the operation performed in xlate
        *) Add new driver to support USB2 PHY and shared USB3 + PCIE PHY in Amlogic
           G12A SoC Family.
        *) Add new driver to support for Broadcom's Stingray USB PHY (Type 1 has
           one super speed PHY and one high speed PHY, Type 2 has one high speed PHY)
        *) Add new driver to support USB PHY in hi3660 SoC of Hisilicon
        *) Add new driver to support UFS M-PHY in MediaTek SoC
        *) Add new driver to support XUSB pad controller in Tegra186 SoCs
        *) Add new driver to support SERDES in TI's AM654 platform
        *) Add support for generation 2 USB2 PHY and gneration 3 USB2 PHY in r8a77470
           to phy-rcar-gen2.c and phy-rcar-gen3-usb2.c respectively
        *) Add support for PCIe QMP PHY support in msm8998 to phy-qcom-qmp.c
        *) Add support for SERDES6G in phy-ocelot-serdes.c
        *) Add support to set drive impedance from device tree in phy-rockchip-emmc.c
        *) Add support to power up/down the VBUS voltage rail in phy-fsl-imx8mq-usb.c
        *) Add support to shut off regulators that power UFS during system suspend
        *) Re-design phy-rcar-gen3-usb2.c to create separate PHY instances for each
           channel which helps to enable/disable interrupts for each instance
           independently
        *) Fix PCIe power up sequence to follow the TRM in order to ensure the DPLL &
           PHY operates correctly over the entire temperature range.
        *) Use devm_clk_get_optional to get optional clocks instead of adding
           custom error checks
      Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      
      * tag 'phy-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy: (51 commits)
        dt-bindings: phy-qcom-qmp: Tweak qcom,msm8998-qmp-ufs-phy
        dt-bindings: phy-qcom-qmp: Add qcom,msm8998-qmp-pcie-phy
        phy: Add usb phy support for hi3660 Soc of Hisilicon
        dt-bindings: phy: Add support for HiSilicon's hi3660 USB PHY
        scsi: phy: mediatek: fix typo in author's email address
        phy: ocelot-serdes: Add support for SERDES6G muxing
        phy: fsl-imx8mq-usb: add support for VBUS power control
        dt-bindings: phy-imx8mq-usb: add optional vbus supply regulator
        phy: qcom-qmp: Add msm8998 PCIe QMP PHY support
        phy: ti: am654-serdes: Support all clksel values
        phy: ti: Add a new SERDES driver for TI's AM654x SoC
        dt-bindings: phy: ti: Add dt binding documentation for SERDES in AM654x SoC
        phy: core: Invoke pm_runtime_get_*/pm_runtime_put_* before invoking reset callback
        phy: core: Add *release* phy_ops invoked when the consumer relinquishes PHY
        phy: phy-meson-gxl-usb2: get optional clock by devm_clk_get_optional()
        phy: socionext: get optional clock by devm_clk_get_optional()
        phy: qcom-qusb2: get optional clock by devm_clk_get_optional()
        phy: phy-mtk-tphy: get optional clock by devm_clk_get_optional()
        phy: renesas: rcar-gen3-usb2: enable/disable independent irqs
        phy: renesas: rcar-gen3-usb2: Use pdev's device pointer on dev_vdbg()
        ...
      d30e413f
  7. 22 Apr, 2019 1 commit
  8. 19 Apr, 2019 6 commits