summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlokilee73 <changjoo.lee@samsung.com>2021-02-10 16:36:51 +0900
committerlokilee73 <changjoo.lee@samsung.com>2021-02-15 10:52:51 +0900
commit4f1fa1507896fe1e755d574a09e6d7e70f9d312f (patch)
treedeeb76958ba18e08992daa77174624360d2f5563
parent0921c1e42ffca45a3f731dfd6a7a3454a268c7dc (diff)
downloaddevice-tm1-4f1fa1507896fe1e755d574a09e6d7e70f9d312f.tar.gz
device-tm1-4f1fa1507896fe1e755d574a09e6d7e70f9d312f.tar.bz2
device-tm1-4f1fa1507896fe1e755d574a09e6d7e70f9d312f.zip
Move common macro to device-common
Change-Id: Ic4d75bb9a108499193a812202e3987a7fc95bc96 Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
-rw-r--r--hw/battery/CMakeLists.txt4
-rw-r--r--hw/battery/battery.c3
-rw-r--r--hw/board/CMakeLists.txt4
-rw-r--r--hw/board/board.c2
-rw-r--r--hw/common/common.h38
-rw-r--r--hw/display/CMakeLists.txt4
-rw-r--r--hw/display/display.c3
-rw-r--r--hw/external_connection/CMakeLists.txt4
-rw-r--r--hw/external_connection/external_connection.c3
-rw-r--r--hw/haptic/CMakeLists.txt4
-rw-r--r--hw/haptic/standard.c2
-rw-r--r--hw/ir/CMakeLists.txt4
-rw-r--r--hw/ir/ir.c2
-rw-r--r--hw/led/CMakeLists.txt4
-rw-r--r--hw/led/led.c2
-rw-r--r--hw/thermal/CMakeLists.txt4
-rw-r--r--hw/thermal/thermal.c2
-rw-r--r--hw/touchscreen/CMakeLists.txt4
-rw-r--r--hw/touchscreen/touchscreen.c2
-rw-r--r--hw/udev.c3
-rw-r--r--hw/usb_gadget/CMakeLists.txt4
-rw-r--r--hw/usb_gadget/usb_gadget.c3
-rw-r--r--packaging/device-manager-plugin-sc7730.spec1
23 files changed, 25 insertions, 81 deletions
diff --git a/hw/battery/CMakeLists.txt b/hw/battery/CMakeLists.txt
index 3649f14..5a9f80c 100644
--- a/hw/battery/CMakeLists.txt
+++ b/hw/battery/CMakeLists.txt
@@ -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 hal-backend-device-common glib-2.0 libudev)
FOREACH(flag ${hal-backend-device-battery_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
diff --git a/hw/battery/battery.c b/hw/battery/battery.c
index 7dde825..525add2 100644
--- a/hw/battery/battery.c
+++ b/hw/battery/battery.c
@@ -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"
diff --git a/hw/board/CMakeLists.txt b/hw/board/CMakeLists.txt
index b18358f..de3acea 100644
--- a/hw/board/CMakeLists.txt
+++ b/hw/board/CMakeLists.txt
@@ -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}")
diff --git a/hw/board/board.c b/hw/board/board.c
index 8e0a8e3..7b1c384 100644
--- a/hw/board/board.c
+++ b/hw/board/board.c
@@ -23,7 +23,7 @@
#include <errno.h>
#include <string.h>
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
#define DATA_BUFF_MAX 256
diff --git a/hw/common/common.h b/hw/common/common.h
deleted file mode 100644
index 37ce972..0000000
--- a/hw/common/common.h
+++ /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__ */
diff --git a/hw/display/CMakeLists.txt b/hw/display/CMakeLists.txt
index 49eee92..116adfa 100644
--- a/hw/display/CMakeLists.txt
+++ b/hw/display/CMakeLists.txt
@@ -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}")
diff --git a/hw/display/display.c b/hw/display/display.c
index 2ad1f53..108b8a7 100644
--- a/hw/display/display.c
+++ b/hw/display/display.c
@@ -26,7 +26,8 @@
#include <hal/device/hal-display-interface.h>
#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/panel"
diff --git a/hw/external_connection/CMakeLists.txt b/hw/external_connection/CMakeLists.txt
index 6f3c189..de0c5e8 100644
--- a/hw/external_connection/CMakeLists.txt
+++ b/hw/external_connection/CMakeLists.txt
@@ -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 hal-backend-device-common glib-2.0 libudev)
FOREACH(flag ${hal-backend-device-external-connection_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
diff --git a/hw/external_connection/external_connection.c b/hw/external_connection/external_connection.c
index 5acee31..ffcc7a5 100644
--- a/hw/external_connection/external_connection.c
+++ b/hw/external_connection/external_connection.c
@@ -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"
diff --git a/hw/haptic/CMakeLists.txt b/hw/haptic/CMakeLists.txt
index 3fb9057..2f2812a 100644
--- a/hw/haptic/CMakeLists.txt
+++ b/hw/haptic/CMakeLists.txt
@@ -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)
diff --git a/hw/haptic/standard.c b/hw/haptic/standard.c
index 123ae6c..5e4f293 100644
--- a/hw/haptic/standard.c
+++ b/hw/haptic/standard.c
@@ -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 */
diff --git a/hw/ir/CMakeLists.txt b/hw/ir/CMakeLists.txt
index 4478493..d7f70f5 100644
--- a/hw/ir/CMakeLists.txt
+++ b/hw/ir/CMakeLists.txt
@@ -1,10 +1,8 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(hal-backend-device-ir C)
-INCLUDE_DIRECTORIES(../common)
-
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED dlog)
+pkg_check_modules(pkgs REQUIRED hal-backend-device-common)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
diff --git a/hw/ir/ir.c b/hw/ir/ir.c
index 3442fb8..79d9d65 100644
--- a/hw/ir/ir.c
+++ b/hw/ir/ir.c
@@ -29,7 +29,7 @@
#include <hal/hal-common-interface.h>
#include <libsyscommon/file.h>
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
#define IRLED_CONTROL_PATH "/sys/class/sec/sec_ir/ir_send"
diff --git a/hw/led/CMakeLists.txt b/hw/led/CMakeLists.txt
index 9457c9a..f3ab22d 100644
--- a/hw/led/CMakeLists.txt
+++ b/hw/led/CMakeLists.txt
@@ -1,10 +1,8 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(hal-backend-device-led C)
-INCLUDE_DIRECTORIES(../common)
-
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED dlog)
+pkg_check_modules(pkgs REQUIRED hal-backend-device-common)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
diff --git a/hw/led/led.c b/hw/led/led.c
index e8c6549..f41a07f 100644
--- a/hw/led/led.c
+++ b/hw/led/led.c
@@ -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 CAMERA_BACK_PATH
#define CAMERA_BACK_PATH "/sys/class/leds/torch-sec1"
diff --git a/hw/thermal/CMakeLists.txt b/hw/thermal/CMakeLists.txt
index 990ebdd..197833c 100644
--- a/hw/thermal/CMakeLists.txt
+++ b/hw/thermal/CMakeLists.txt
@@ -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}")
diff --git a/hw/thermal/thermal.c b/hw/thermal/thermal.c
index 294a3bb..65c2769 100644
--- a/hw/thermal/thermal.c
+++ b/hw/thermal/thermal.c
@@ -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"
diff --git a/hw/touchscreen/CMakeLists.txt b/hw/touchscreen/CMakeLists.txt
index dbfa733..e18741e 100644
--- a/hw/touchscreen/CMakeLists.txt
+++ b/hw/touchscreen/CMakeLists.txt
@@ -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}")
diff --git a/hw/touchscreen/touchscreen.c b/hw/touchscreen/touchscreen.c
index af45ab0..319c37c 100644
--- a/hw/touchscreen/touchscreen.c
+++ b/hw/touchscreen/touchscreen.c
@@ -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/udev.c b/hw/udev.c
index 91d1aa2..b843b31 100644
--- a/hw/udev.c
+++ b/hw/udev.c
@@ -23,9 +23,10 @@
#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"
diff --git a/hw/usb_gadget/CMakeLists.txt b/hw/usb_gadget/CMakeLists.txt
index 35e615e..7146f92 100644
--- a/hw/usb_gadget/CMakeLists.txt
+++ b/hw/usb_gadget/CMakeLists.txt
@@ -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}")
diff --git a/hw/usb_gadget/usb_gadget.c b/hw/usb_gadget/usb_gadget.c
index f3089dc..67c91a1 100644
--- a/hw/usb_gadget/usb_gadget.c
+++ b/hw/usb_gadget/usb_gadget.c
@@ -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)
{
diff --git a/packaging/device-manager-plugin-sc7730.spec b/packaging/device-manager-plugin-sc7730.spec
index db7e9cd..0c7e67b 100644
--- a/packaging/device-manager-plugin-sc7730.spec
+++ b/packaging/device-manager-plugin-sc7730.spec
@@ -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(libudev)
BuildRequires: pkgconfig(hal-api-common)