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>