Move common macro to device-common 70/253470/2 accepted/tizen/unified/20210215.130915 submit/tizen/20210215.055935
authorlokilee73 <changjoo.lee@samsung.com>
Wed, 10 Feb 2021 11:31:30 +0000 (20:31 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Mon, 15 Feb 2021 01:58:37 +0000 (10:58 +0900)
Change-Id: I9f3265c8b99d8fe2cd2d937292bcf0418204cb57
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
19 files changed:
hw/battery/CMakeLists.txt
hw/battery/battery.c
hw/bezel/CMakeLists.txt
hw/bezel/bezel.c
hw/common/common.h [deleted file]
hw/display/CMakeLists.txt
hw/display/display.c
hw/external_connection/CMakeLists.txt
hw/external_connection/external_connection.c
hw/haptic/CMakeLists.txt
hw/haptic/standard.c
hw/thermal/CMakeLists.txt
hw/thermal/thermal.c
hw/touchscreen/CMakeLists.txt
hw/touchscreen/touchscreen.c
hw/udev.c
hw/usb_gadget/CMakeLists.txt
hw/usb_gadget/usb_gadget.c
packaging/device-manager-plugin-tw3.spec

index 3649f142afec1a065b90585a12541e44851573ac..60387dfd4609001b7553521049bba2f3c67b03d6 100644 (file)
@@ -3,10 +3,8 @@ PROJECT(hal-backend-device-battery C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-battery_pkgs REQUIRED dlog glib-2.0 libudev)
+pkg_check_modules(hal-backend-device-battery_pkgs REQUIRED glib-2.0 libudev hal-backend-device-common)
 
 FOREACH(flag ${hal-backend-device-battery_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index e573bd1ebd00ee1e859fc95d31f43f9d39dd0bb2..64987fed32a95f0056d3861db6f6a9dc46ef31f9 100644 (file)
@@ -28,7 +28,8 @@
 #include <hal/hal-common-interface.h>
 #include <libsyscommon/file.h>
 
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
+
 #include "../udev.h"
 
 #define BATTERY_ROOT_PATH "/sys/class/power_supply"
index ab190af395af1dc1c7acb4d54d654e45001765c0..d09ef4c67bd2a7a6772b025a7c111a836228796a 100644 (file)
@@ -3,10 +3,8 @@ PROJECT(hal-backend-device-bezel C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-bezel_pkgs REQUIRED dlog)
+pkg_check_modules(hal-backend-device-bezel_pkgs REQUIRED hal-backend-device-common)
 
 FOREACH(flag ${hal-backend-device-bezel_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 5cbc2f7a19d41c953299654d8732c2b593959e99..a6f32f56e020a1f999785bc9dc7cce27308165c7 100644 (file)
@@ -28,7 +28,7 @@
 #include <hal/hal-common-interface.h>
 #include <libsyscommon/file.h>
 
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
 
 #define INPUT_PATH      "/sys/class/input/"
 #define KEY_CAPABILITIES_PATH  "/device/capabilities/key"
diff --git a/hw/common/common.h b/hw/common/common.h
deleted file mode 100644 (file)
index 37ce972..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __HAL_BACKEND_COMMON_H__
-#define __HAL_BACKEND_COMMON_H__
-
-#ifdef FEATURE_DLOG
-    #define LOG_TAG "HAL_BACKEND_DEVICE"
-    #include <dlog.h>
-    #define _D(fmt, args...)    SLOGD(fmt, ##args)
-    #define _I(fmt, args...)    SLOGI(fmt, ##args)
-    #define _W(fmt, args...)    SLOGW(fmt, ##args)
-    #define _E(fmt, args...)    SLOGE(fmt, ##args)
-#else
-    #define _D(x, ...)
-    #define _I(x, ...)
-    #define _W(x, ...)
-    #define _E(x, ...)
-#endif
-
-#define EXPORT __attribute__ ((visibility("default")))
-
-#define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
-
-#endif /* __HAL_BACKEND_COMMON_H__ */
index df86ec52330e370f9c62432049b16fe915424d0d..c10dfdd6bdf7b9b07133b25d3854c01966999dd8 100644 (file)
@@ -3,10 +3,8 @@ PROJECT(hal-backend-device-display C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-display_pkgs REQUIRED dlog capi-system-info)
+pkg_check_modules(hal-backend-device-display_pkgs REQUIRED capi-system-info hal-backend-device-common)
 
 FOREACH(flag ${hal-backend-device-display_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index e39d38b24676561efff8c53fbd2fb1eebc64cfd3..77f3348b6b7731b01c37a99e98433eac66ce5562 100644 (file)
@@ -28,7 +28,7 @@
 #include <hal/hal-common-interface.h>
 #include <libsyscommon/file.h>
 
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
 
 #define MODEL_NAME      "http://tizen.org/system/model_name"
 
index 6f3c189e21fb75f2ab747bccc04916fda597dcd1..7366aee3c3d720ec8b0e95eaa07d02772ee0fa7f 100644 (file)
@@ -3,10 +3,8 @@ PROJECT(hal-backend-device-external-connection C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-external-connection_pkgs REQUIRED dlog glib-2.0 libudev)
+pkg_check_modules(hal-backend-device-external-connection_pkgs REQUIRED glib-2.0 libudev hal-backend-device-common)
 
 FOREACH(flag ${hal-backend-device-external-connection_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index c22d1aa29d814a2746985d19ddb5015d1093145f..925f8dac720011ebf1ba70347661daf2ea79700a 100644 (file)
@@ -27,7 +27,8 @@
 #include <hal/device/hal-external_connection-interface.h>
 #include <hal/hal-common-interface.h>
 
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
+
 #include "../udev.h"
 
 #define SWITCH_ROOT_PATH "/sys/devices/virtual/switch"
index 3fb9057e72ad00bf79db2e280c64a05ba2521f11..a1a21dcf24a65d876c38b99b50cd820873d4fb32 100644 (file)
@@ -3,13 +3,11 @@ PROJECT(hal-backend-device-haptic C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
 pkg_check_modules(haptic_pkgs REQUIRED
-               dlog
                glib-2.0
-               libsyscommon)
+               libsyscommon
+               hal-backend-device-common)
 
 FOREACH(flag ${haptic_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index d30b12b898f0ac2bb1e2f779772695c3fef847cf..23f5f3b4cefdf6b39f6ecc548ac46d9e6b233f48 100644 (file)
@@ -31,7 +31,7 @@
 #include <libsyscommon/list.h>
 #include <hal/device/hal-haptic-interface.h>
 
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
 
 #define MAX_MAGNITUDE                  0xFFFF
 #define PERIODIC_MAX_MAGNITUDE 0x7FFF  /* 0.5 * MAX_MAGNITUDE */
index 990ebdd96aeead9285878c2623098ee6549d4502..2db3ea49830ee816442598de223ca8c82022a1b4 100644 (file)
@@ -3,10 +3,8 @@ PROJECT(hal-backend-device-thermal C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-thermal_pkgs REQUIRED dlog glib-2.0)
+pkg_check_modules(hal-backend-device-thermal_pkgs REQUIRED glib-2.0 hal-backend-device-common)
 
 FOREACH(flag ${hal-backend-device-thermal_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 279ce1e4e502aa8281869098bf8a1312279b2775..0daf0a75c7a3362c5e951915dd8428e06a2b394b 100644 (file)
@@ -26,7 +26,7 @@
 #include <hal/device/hal-thermal-interface.h>
 #include <hal/hal-common-interface.h>
 
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
 
 #define AP_PATH                "/sys/class/sec/temperature/ap_therm"
 #define BATTERY_PATH   "/sys/class/sec/temperature/batt_therm"
index dbfa733af16532ed1d1878fdf04302a0d7027c3f..e18741e41a34ca43efcbe27317e45ec742f92366 100644 (file)
@@ -3,10 +3,8 @@ PROJECT(hal-backend-device-touchscreen C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-touchscreen_pkgs REQUIRED dlog)
+pkg_check_modules(hal-backend-device-touchscreen_pkgs REQUIRED hal-backend-device-common)
 
 FOREACH(flag ${hal-backend-device-touchscreen_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 73a3597b4c77b92c9b5a57d712db7fe1a71fd148..c8e46c9a4b583fcd2c7dabae1e2a3e15bdffabd9 100644 (file)
@@ -28,7 +28,7 @@
 #include <hal/hal-common-interface.h>
 #include <libsyscommon/file.h>
 
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
 
 #define INPUT_PATH      "/sys/class/input/"
 #define KEY_CAPABILITIES_PATH  "/device/capabilities/key"
index 91d1aa2e2a107c23a7346b07a2d1ccb98dc0646b..099f4d1c3cc460dd345f940bafa07ad41eb1aad0 100644 (file)
--- a/hw/udev.c
+++ b/hw/udev.c
 #include <libudev.h>
 #include <glib.h>
 #include <string.h>
-#include "common.h"
+
 #include "udev.h"
 
+#include </hal/include/device/hal-backend-common.h>
+
 #define EVENT_KERNEL       "kernel"
 #define EVENT_UDEV         "udev"
 
index 35e615ed7b7c081e7212c5540b463a8ea2d1a6f2..7146f9274aec0423e685fc811f867d2dd81b01f6 100644 (file)
@@ -3,10 +3,8 @@ PROJECT(hal-backend-device-usb-gadget C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-usb-gadget_pkgs REQUIRED dlog hal-backend-device-common)
+pkg_check_modules(hal-backend-device-usb-gadget_pkgs REQUIRED hal-backend-device-common)
 
 FOREACH(flag ${hal-backend-device-usb-gadget_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index f54eddf1da9165c7eef9df5bc995f16a1ae2afec..bcaa2ae112597037ab8c4f2e18a3b2677613ca0c 100644 (file)
@@ -22,7 +22,7 @@
 
 #include </hal/include/device/hal-backend-common-usb_gadget.h>
 
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
 
 static int usb_gadget_init(void **data)
 {
index 3760dbf74762a0721ca737c18dcc59f528535a21..73cd5c71760646e69b097e1f17a52035f1b6b6bb 100644 (file)
@@ -7,7 +7,6 @@ License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 Source1:    %{name}.manifest
 BuildRequires:    cmake
-BuildRequires:    pkgconfig(dlog)
 BuildRequires:    pkgconfig(glib-2.0)
 BuildRequires:    pkgconfig(libusbgx)
 BuildRequires:    pkgconfig(libudev)