1. 16 Mar, 2020 3 commits
    • Masahiro Yamada's avatar
      usb: get rid of 'choice' for legacy gadget drivers · df8df5e4
      Masahiro Yamada authored
      drivers/usb/gadget/legacy/Kconfig creates a 'choice' inside another
      'choice'.
      
      The outer choice: line 17 "USB Gadget precomposed configurations"
      The inner choice: line 484 "EHCI Debug Device mode"
      
      I wondered why the whole legacy gadget drivers reside in such a big
      choice block.
      
      This dates back to 2003, "[PATCH] USB: fix for multiple definition of
      `usb_gadget_get_string'". [1]
      
      At that time, the global function, usb_gadget_get_string(), was linked
      into multiple drivers. That was why only one driver was able to become
      built-in at the same time.
      
      Later, commit a84d9e53 ("usb: gadget: start with libcomposite")
      moved usb_gadget_get_string() to a separate module, libcomposite.ko
      instead of including usbstring.c from multiple modules.
      
      More and more refactoring was done, and after commit 1bcce939
      ("usb: gadget: multi: convert to new interface of f_mass_storage"),
      you can link multiple gadget drivers into vmlinux without causing
      multiple definition error.
      
      This is the only user of the nested choice structure ever. Removing
      this mess will make some Kconfig cleanups possible.
      
      [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=fee4cf49a81381e072c063571d1aadbb29207408Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarFelipe Balbi <balbi@kernel.org>
      Link: https://lore.kernel.org/r/20200315154948.26569-1-masahiroy@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      df8df5e4
    • Stephen Rothwell's avatar
      usb: dwc3: fix up for role switch API change · 0339f7fb
      Stephen Rothwell authored
      After merging the usb-gadget tree, today's linux-next build (arm
      multi_v7_defconfig) failed like this:
      
      drivers/usb/dwc3/drd.c: In function 'dwc3_setup_role_switch':
      drivers/usb/dwc3/drd.c:551:23: error: assignment to 'usb_role_switch_set_t' {aka 'int (*)(struct usb_role_switch *, enum usb_role)'} from incompatible pointer type 'int (*)(struct device *, enum usb_role)' [-Werror=incompatible-pointer-types]
        551 |  dwc3_role_switch.set = dwc3_usb_role_switch_set;
            |                       ^
      drivers/usb/dwc3/drd.c:552:23: error: assignment to 'usb_role_switch_get_t' {aka 'enum usb_role (*)(struct usb_role_switch *)'} from incompatible pointer type 'enum usb_role (*)(struct device *)' [-Werror=incompatible-pointer-types]
        552 |  dwc3_role_switch.get = dwc3_usb_role_switch_get;
            |                       ^
      
      Caused by commit
      
        8a0a1379 ("usb: dwc3: Registering a role switch in the DRD code.")
      
      interacting with commit
      
        bce3052f ("usb: roles: Provide the switch drivers handle to the switch in the API")
      
      from the usb tree.
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Link: https://lore.kernel.org/r/20200316143752.473f1073@canb.auug.org.auSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0339f7fb
    • Greg Kroah-Hartman's avatar
      Merge tag 'usb-for-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next · a8ab3e76
      Greg Kroah-Hartman authored
      Felipe writes:
      
      USB: changes for v5.7 merge window
      
      Lots of changes on dwc3 this time, most of them from Thinh fixing a
      bunch of really old mishaps on the driver.
      
      DWC2 got support for STM32MP15 and a couple RockChip SoCs while DWC3
      learned about Amlogic A1 family.
      
      Apart from these, we have a few spelling fixes and other minor
      non-critical fixes all over the place.
      Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
      
      * tag 'usb-for-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (41 commits)
        dt-bindings: usb: add documentation for aspeed usb-vhub
        ARM: dts: aspeed-g4: add vhub port and endpoint properties
        ARM: dts: aspeed-g5: add vhub port and endpoint properties
        ARM: dts: aspeed-g6: add usb functions
        usb: gadget: aspeed: add ast2600 vhub support
        usb: gadget: aspeed: read vhub properties from device tree
        usb: gadget: aspeed: support per-vhub usb descriptors
        usb: gadget: f_phonet: Replace zero-length array with flexible-array member
        usb: gadget: composite: Inform controller driver of self-powered
        usb: gadget: amd5536udc: fix spelling mistake "reserverd" -> "reserved"
        udc: s3c-hsudc: Silence warning about supplies during deferred probe
        usb: dwc2: Silence warning about supplies during deferred probe
        dt-bindings: usb: dwc2: add compatible property for rk3368 usb
        dt-bindings: usb: dwc2: add compatible property for rk3328 usb
        usb: gadget: add raw-gadget interface
        usb: dwc2: Implement set_selfpowered()
        usb: dwc3: qcom: Replace <linux/clk-provider.h> by <linux/of_clk.h>
        usb: dwc3: core: don't do suspend for device mode if already suspended
        usb: dwc3: Rework resets initialization to be more flexible
        usb: dwc3: Rework clock initialization to be more flexible
        ...
      a8ab3e76
  2. 15 Mar, 2020 37 commits