usb: reimplementing sdb default enable mode and removeing engineer mode 48/267348/4
authorINSUN PYO <insun.pyo@samsung.com>
Thu, 2 Dec 2021 05:08:34 +0000 (14:08 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Thu, 2 Dec 2021 07:21:30 +0000 (07:21 +0000)
By changeing vconf default key,
public tizen always operates in sdb enable mode.

Change-Id: I00b3c0707cda880a06225c359d6d551f80f4d089

CMakeLists.txt
packaging/deviced.spec
src/tools/devicectl/CMakeLists.txt
src/usb/usb-state.c
tests/auto-test/CMakeLists.txt

index 68ce4f7..5e4c717 100644 (file)
@@ -217,10 +217,6 @@ ADD_DEFINITIONS("-DENABLE_DEVICED_DLOG")
 ADD_DEFINITIONS("-DENABLE_LIBDEVICED_DLOG")
 ADD_DEFINITIONS("-DENABLE_PM_LOG")
 
-IF(ENGINEER_MODE STREQUAL on)
-       ADD_DEFINITIONS("-DENGINEER_MODE")
-ENDIF(ENGINEER_MODE STREQUAL on)
-
 IF(BATTERY_MODULE STREQUAL on)
        ADD_DEFINITIONS("-DBATTERY_MODULE")
 ENDIF(BATTERY_MODULE STREQUAL on)
index 58ed7ce..7191f5d 100644 (file)
@@ -142,12 +142,6 @@ Plugin libraries for IoT headless devices
        %define ARCH_BIT 64
 %endif
 
-%if 0%{?tizen_build_devel_mode} == 1
-%define engineer_mode on
-%else
-%define engineer_mode off
-%endif
-
 %define battery_module on
 
 %cmake . \
@@ -156,7 +150,6 @@ Plugin libraries for IoT headless devices
        -DARCH=%{ARCH} \
        -DARCH_BIT=%{ARCH_BIT} \
        -DDPMS=%{DPMS} \
-       -DENGINEER_MODE=%{engineer_mode} \
        -DBATTERY_MODULE=%{battery_module} \
        -DDISPLAY_MODULE=on \
        -DEXTCON_MODULE=on \
index 88dd89f..931e375 100644 (file)
@@ -1,10 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 PROJECT(devicectl C)
 
-IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_ENGINEER_MODE")
-    OPTION(USE_ENGINEER_MODE "Use Engineer mode" ON)
-ENDIF()
-
 SET(SRCS
        devicectl.c
        usb.c
index 284e468..17df193 100644 (file)
@@ -161,22 +161,6 @@ void usb_state_retrieve_selected_mode(void)
                break;
        }
 
-       /*
-        * Tizen has no way of having different vconf value in engineer mode and user mode.
-        * So, alternatively, always enable SDB in engineer mode.
-        *
-        * Expected default sel_mode value in vconf in user     mode: 1 (MTP + ACM)
-        * Expected default sel_mode value in vconf in engineer mode: 2 (MTP + ACM + SDB)
-        */
-#ifdef ENGINEER_MODE
-       _I("Engineer mode. USB mode %#x, debug state %d", usb_selected_mode, get_usb_debug_state());
-
-       if (!(usb_selected_mode & USB_FUNCTION_SDB)) {
-               usb_selected_mode = USB_FUNCTION_MTP | USB_FUNCTION_ACM | USB_FUNCTION_SDB;
-               (void)usb_state_set_selected_mode(usb_selected_mode);
-       }
-#endif
-
        /* To sync with vconf for debug mode */
        set_usb_debug_state((bool)(usb_selected_mode & USB_FUNCTION_SDB));
 }
index 341c366..3e72830 100644 (file)
@@ -3,10 +3,6 @@ PROJECT(deviced-auto-test C)
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
 
-IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_ENGINEER_MODE")
-    OPTION(USE_ENGINEER_MODE "Use Engineer mode" ON)
-ENDIF()
-
 SET(SRCS
        test.c
        main.c