Move common macro to device-common 24/253524/2 accepted/tizen/unified/20210215.130931 submit/tizen/20210215.055935
authorlokilee73 <changjoo.lee@samsung.com>
Mon, 15 Feb 2021 01:37:01 +0000 (10:37 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Mon, 15 Feb 2021 01:46:59 +0000 (10:46 +0900)
Change-Id: I22c4cfda003ef78936cc179da4549b12b3532038
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-rpi3.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 ac07ed416c9d05da4a2cf888d16f39565619a928..56a2d7dae3428a6cd2b4a11eeee6cc4abcc4ede4 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 b1d77d5ec2d6d8d9f8f8054ee4650782008db765..1f1172617548cadae1e8a2466733080ad4e2982e 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/rpi_backlight"
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 20123fcf3029882115141b0442a5ab96abd81785..3d4b20c0739fb2d4cfdfec4415ee778264691617 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 2a86dc4fcdfd2bdf2cfa27132608b2da571c2aa5..c0e158337d4adfde547c1cc26e442ce16cc4f316 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 42f617d64e8e7841cfffa7d537061879b20ca306..16b78f237abebe184cafbf1119ffe4ca34f74b08 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 1062ebfb9e06895295129c1d79e3ff1ba9bb3d66..903e7d2426e2c4bbe38e4290cda41f38f3726797 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 b6e4077e9ebe2b46353f44fb2413cea9a8fbb9ff..ff4e9b82214c6e80e9e69b07ab3c8d4ec681f77e 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 TOUCHSCREEN_CON_FILE   "/sys/devices/platform/rpi_ft5406/enable"
 
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 2e70c52e15f0be659f52c8446685a59cb0e54b31..3a35e4f120691e5215143a31f869697e13d8cbec 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 83e8c06b9fbf3750996b54b82a2811fa333bf404..31b0fd99ca019397518f8fb672fdc6c1bd6baf08 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(hal-api-common)