usb: gadget: Allow to build multiple legacy gadgets 31/86531/2
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Thu, 1 Sep 2016 16:37:59 +0000 (18:37 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 5 Sep 2016 01:29:17 +0000 (18:29 -0700)
commitf500e7d1093f8a0f58bab4e185ccb0b5fd24c11c
tree0e406df8f09baf3481faffe443e1769ca412d891
parentd6e68cb0303d38fca82d33ef265e035cd9cfe442
usb: gadget: Allow to build multiple legacy gadgets

Currently it is possible to build in only one legac gadget *OR*
compile multiple of them as a modules. It's not possible to mix
those 2 ways of building them. This is limited only by Kconfig not
any functionality.

This patch removes this limitation. With this patch it is possible
to set up all build combinations:
1) Multiple gadgets build in
2) Some gadgets build in and some build as a modules
etc.

As this patch makes Kconfig quite complicated let me clarify how it works:

USB_F_<func name> - used in makefile for compilation
USB_G_<gadget name>_REQ_F_<func name> - set up by gadget to mark
      that this particular gadget requires this func to work
      USB_F_<func name>_SELECTOR - helper config which is used to determine
          if function should be build in or compiled as a module

Change-Id: I43b764ff27d08484df140835a6f2dee35d621248
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
drivers/usb/gadget/Kconfig