From 8df4b70042955270262d97a376f3db98eaa0d1f9 Mon Sep 17 00:00:00 2001 From: INSUN PYO Date: Thu, 2 Dec 2021 14:08:34 +0900 Subject: [PATCH] usb: reimplementing sdb default enable mode and removeing engineer mode By changeing vconf default key, public tizen always operates in sdb enable mode. Change-Id: I00b3c0707cda880a06225c359d6d551f80f4d089 --- CMakeLists.txt | 4 ---- packaging/deviced.spec | 7 ------- src/tools/devicectl/CMakeLists.txt | 4 ---- src/usb/usb-state.c | 16 ---------------- tests/auto-test/CMakeLists.txt | 4 ---- 5 files changed, 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 68ce4f7..5e4c717 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/packaging/deviced.spec b/packaging/deviced.spec index 58ed7ce..7191f5d 100644 --- a/packaging/deviced.spec +++ b/packaging/deviced.spec @@ -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 \ diff --git a/src/tools/devicectl/CMakeLists.txt b/src/tools/devicectl/CMakeLists.txt index 88dd89f..931e375 100644 --- a/src/tools/devicectl/CMakeLists.txt +++ b/src/tools/devicectl/CMakeLists.txt @@ -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 diff --git a/src/usb/usb-state.c b/src/usb/usb-state.c index 284e468..17df193 100644 --- a/src/usb/usb-state.c +++ b/src/usb/usb-state.c @@ -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)); } diff --git a/tests/auto-test/CMakeLists.txt b/tests/auto-test/CMakeLists.txt index 341c366..3e72830 100644 --- a/tests/auto-test/CMakeLists.txt +++ b/tests/auto-test/CMakeLists.txt @@ -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 -- 2.7.4