Move common macro to device-common 26/253526/1 accepted/tizen/unified/20210215.130923 submit/tizen/20210215.055935
authorlokilee73 <changjoo.lee@samsung.com>
Mon, 15 Feb 2021 02:14:30 +0000 (11:14 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Mon, 15 Feb 2021 02:14:34 +0000 (11:14 +0900)
Change-Id: I43143884efe740b42e9b04e0f9f682c17de2f6f6
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
16 files changed:
hw/board/CMakeLists.txt
hw/board/board.c
hw/common/common.h [deleted file]
hw/display/CMakeLists.txt
hw/display/display.c
hw/haptic/CMakeLists.txt
hw/haptic/gpio.c
hw/led/CMakeLists.txt
hw/led/led.c
hw/thermal/CMakeLists.txt
hw/thermal/thermal.c
hw/touchscreen/CMakeLists.txt
hw/touchscreen/touchscreen.c
hw/usb_gadget/CMakeLists.txt
hw/usb_gadget/usb_gadget.c
packaging/device-manager-plugin-artik.spec

index b18358f5672835f99f207f1a9015d8996eda6955..de3acea9a55e024e5347a8976cd50844d2d0f119 100644 (file)
@@ -3,10 +3,8 @@ PROJECT(hal-backend-device-board C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-board_pkgs REQUIRED dlog)
+pkg_check_modules(hal-backend-device-board_pkgs REQUIRED hal-backend-device-common)
 
 FOREACH(flag ${hal-backend-device-board_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 535bb130ab9e82649e57c68a40bb8576eb44f21d..d024e449ed06cb2ab7c430d16d9013560d2d5cc9 100644 (file)
@@ -23,7 +23,7 @@
 #include <errno.h>
 #include <string.h>
 
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
 
 #define SERIAL_FILE_PATH "/sys/firmware/devicetree/base/serial-number"
 #define LINE_LEN 64
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 49eee926ff8c00fc8ad4ddebcda8c4f0a670cd20..116adfa1e95c2b97f26190ec0593c7c799b956a4 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)
+pkg_check_modules(hal-backend-device-display_pkgs REQUIRED hal-backend-device-common)
 
 FOREACH(flag ${hal-backend-device-display_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 75ec356de749de3438eca682274e848bcd6828fb..8b255f8d75c96e3f0b24ba6d65abba5d3dd0d45b 100644 (file)
@@ -27,7 +27,7 @@
 #include <hal/hal-common-interface.h>
 #include <libsyscommon/file.h>
 
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
 
 #ifndef BACKLIGHT_PATH
 //#define BACKLIGHT_PATH  "/sys/class/backlight/s6e36w1x01-bl"
index 9671b52e127047e001c307ae8ed82875e97397de..d3b5d3c1a0398f10704c26f29a01882f823efca3 100644 (file)
@@ -3,11 +3,9 @@ PROJECT(hal-backend-device-haptic C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
 pkg_check_modules(haptic_pkgs REQUIRED
-               dlog
+               hal-backend-device-common
                glib-2.0
                libsyscommon
                capi-system-peripheral-io)
index 67ba19afd6294ac657607d93062238ccc5f989be..0f8e3b9d43efb30678dc0418d9f29348006c410a 100644 (file)
@@ -22,7 +22,7 @@
 #include <libsyscommon/list.h>
 #include <hal/device/hal-haptic-interface.h>
 
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
 
 #define GPIO_I2C_BUS_INDEX             1
 #define MAX_HAPIC                              1
index 8572342af56d87f1e0652c6eef362b2500933ca4..607ef662fdff37b5d27c183e1ee6f0b7528b7cc5 100644 (file)
@@ -3,10 +3,8 @@ PROJECT(hal-backend-device-led C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
-INCLUDE_DIRECTORIES(../common)
-
 INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-led_pkgs REQUIRED dlog glib-2.0 capi-system-peripheral-io)
+pkg_check_modules(hal-backend-device-led_pkgs REQUIRED hal-backend-device-common glib-2.0 capi-system-peripheral-io)
 
 FOREACH(flag ${hal-backend-device-led_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index cb00e31d76097cb23b186aa03db59abea689f477..1549cac6019399d85781f22a089f7b8fd0bdc7b0 100644 (file)
@@ -22,7 +22,8 @@
 
 #include <hal/device/hal-led-interface.h>
 #include <hal/hal-common-interface.h>
-#include "common.h"
+
+#include </hal/include/device/hal-backend-common.h>
 
 #include <peripheral_io.h>
 
index 990ebdd96aeead9285878c2623098ee6549d4502..197833c7642af091298ca5b19a502be99ccd17ff 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 hal-backend-device-common glib-2.0)
 
 FOREACH(flag ${hal-backend-device-thermal_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 26930b160e0b8a5cd651c4bb3dc4fb76136fd556..29751c74e9c99f835b9ecd69195efdb5e8afd9e2 100644 (file)
@@ -25,7 +25,8 @@
 
 #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/thermal/thermal_zone0/temp"
 
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 4f2d97a0b69beaa8567afe372294af33c6ad3ddb..e80ab2ee379715cc35b9f49e3bd98a7e01bfb373 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 35e615ed7b7c081e7212c5540b463a8ea2d1a6f2..c744e99709ad0a743ba4ac92f88c65184cab5d3d 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 hal-backend-device-common)
 
 FOREACH(flag ${hal-backend-device-usb-gadget_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 4b0a73c1f04dd71b67699ecd3952d4ad96012a83..8821a1ace09ee5cfc14017f08b7978eeaac9dbd3 100644 (file)
@@ -21,8 +21,7 @@
 #include <hal/device/hal-usb_gadget-interface.h>
 
 #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 cc8b514823337c4d12188baccbad47d56110e7e3..0fa938f57259de4e504104ab05dcaa1c736bb641 100644 (file)
@@ -9,7 +9,6 @@ Source1:    %{name}.manifest
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 BuildRequires:  cmake
-BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(capi-system-peripheral-io)
 BuildRequires:  pkgconfig(libusbgx)