usb-gadget: introduce configurable function set 39/273839/15
authorYoungjae Cho <y0.cho@samsung.com>
Thu, 14 Apr 2022 10:00:24 +0000 (19:00 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Mon, 2 May 2022 05:10:01 +0000 (14:10 +0900)
commit6c40650791fb99dea6b1734c0e700c3bb27fcb43
tree1cb8e560d696b279e84abfc4796850b15d853874
parentb8fca3a46cccba73c05f5014d2c26f781555f50b
usb-gadget: introduce configurable function set

Previously, only a few predefine set of usb-gadget function can be
utilized for setting usb-gadget, e.g., SET_USB_SDB_DIAG means it only
activates usb-gadget functions of sdb/diag, and you are not allowed
to activates any other usb-gadget combination than those predefined
set.

For a better intuitive useability, remove those predefined set. And
you are now allowed to combine any kind of usb-gadget functions you
want to use, making up a bitmap, which can be used for activating
all those usb-gadget functions through vconf(db/usb/sel_mode).

Usb-gadget functions are defined in capi-system-device.
 - USB_GADGET_FUNC_NONE  = 0x00
 - USB_GADGET_FUNC_SDB   = 0x01
 - USB_GADGET_FUNC_MTP   = 0x02
 - USB_GADGET_FUNC_RNDIS = 0x04
 - USB_GADGET_FUNC_ACM   = 0x08
 - USB_GADGET_FUNC_DIAG  = 0x10
 - USB_GADGET_FUNC_RMNET = 0x20

Change-Id: I44c2bb2c751129613a3470569edf8babbe710845
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
15 files changed:
src/usb-gadget/usb-dbus.c
src/usb-gadget/usb-debug.c
src/usb-gadget/usb-debug.h
src/usb-gadget/usb-gadget-cfs-ops.c [moved from src/usb-gadget/usb-gadget-cfs-gadget.c with 98% similarity]
src/usb-gadget/usb-gadget-cfs-ops.h [new file with mode: 0644]
src/usb-gadget/usb-gadget-legacy-ops.c [moved from src/usb-gadget/usb-gadget-legacy-gadget.c with 96% similarity]
src/usb-gadget/usb-gadget-legacy-ops.h [new file with mode: 0644]
src/usb-gadget/usb-gadget-ops.c [new file with mode: 0644]
src/usb-gadget/usb-gadget-ops.h [new file with mode: 0644]
src/usb-gadget/usb-gadget.c
src/usb-gadget/usb-gadget.h
src/usb-gadget/usb-state.c
src/usb-gadget/usb-tethering.c
src/usb-gadget/usb.c [deleted file]
src/usb-gadget/usb.h [deleted file]