From: Youngjae Cho Date: Thu, 14 Apr 2022 02:10:32 +0000 (+0900) Subject: usb-gadget: relocate declarations of enum X-Git-Tag: accepted/tizen/unified/20220505.134703~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c840558d1e95d9f2d782ee826fd28b69578006e;p=platform%2Fcore%2Fsystem%2Fdeviced.git usb-gadget: relocate declarations of enum Move USB_FUNCTION_IDX_* from hal-api-device to deviced. Move USB_FUNCTION_* from hal-api-device to capi-system-device. Change-Id: I820fa7532c9376ccf41fdfe7684a39613e60e16b Signed-off-by: Youngjae Cho --- diff --git a/src/usb/usb-dbus.c b/src/usb/usb-dbus.c index 137a5e1..35eb16d 100644 --- a/src/usb/usb-dbus.c +++ b/src/usb/usb-dbus.c @@ -25,6 +25,7 @@ #include "core/log.h" #include "usb.h" +#include "usb-gadget.h" #include "usb-debug.h" /* Legacy signals */ diff --git a/src/usb/usb-debug.c b/src/usb/usb-debug.c index f6bfb23..22b5025 100644 --- a/src/usb/usb-debug.c +++ b/src/usb/usb-debug.c @@ -26,6 +26,7 @@ #include "shared/device-notifier.h" #include "usb.h" +#include "usb-gadget.h" static bool debug_state; diff --git a/src/usb/usb-gadget.h b/src/usb/usb-gadget.h index 161be96..e98442f 100644 --- a/src/usb/usb-gadget.h +++ b/src/usb/usb-gadget.h @@ -2,7 +2,7 @@ #define __USB_GADGET_H__ #include -#include +#include /*The default USB configuration */ #define DEFAULT_VID 0x04e8 @@ -73,6 +73,19 @@ struct usb_gadget_id { unsigned int function_mask; }; +enum { + USB_FUNCTION_IDX_MTP = 0, + USB_FUNCTION_IDX_ACM = 1, + USB_FUNCTION_IDX_SDB = 2, + USB_FUNCTION_IDX_RNDIS = 3, + USB_FUNCTION_IDX_DIAG = 4, + USB_FUNCTION_IDX_CONN_GADGET = 5, + USB_FUNCTION_IDX_DM = 6, + USB_FUNCTION_IDX_RMNET = 7, + USB_FUNCTION_IDX_MAX = USB_FUNCTION_IDX_RMNET + 1 +}; + + struct usb_function *find_usb_function_by_name(const char *name); struct usb_function *find_usb_function_by_name_instance(const char *name, const char *instance); diff --git a/src/usb/usb-tethering.c b/src/usb/usb-tethering.c index f0d7142..76dcb7d 100644 --- a/src/usb/usb-tethering.c +++ b/src/usb/usb-tethering.c @@ -25,6 +25,7 @@ #include "shared/device-notifier.h" #include "usb.h" +#include "usb-gadget.h" static bool tethering_state;