diff options
author | lokilee73 <changjoo.lee@samsung.com> | 2021-02-15 11:14:30 +0900 |
---|---|---|
committer | lokilee73 <changjoo.lee@samsung.com> | 2021-02-15 11:14:34 +0900 |
commit | 1bf67d8c34cca1ff391fee9beb0c6506809c53d0 (patch) | |
tree | 05bcf10d42942e9997127ee223e764418b6c26d3 | |
parent | 79c46e9b48f88a88cd3e15c4b9abebdfaba7be9a (diff) | |
download | device-manager-plugin-artik-1bf67d8c34cca1ff391fee9beb0c6506809c53d0.tar.gz device-manager-plugin-artik-1bf67d8c34cca1ff391fee9beb0c6506809c53d0.tar.bz2 device-manager-plugin-artik-1bf67d8c34cca1ff391fee9beb0c6506809c53d0.zip |
Move common macro to device-commonsubmit/tizen/20210215.055935accepted/tizen/unified/20210215.130923
Change-Id: I43143884efe740b42e9b04e0f9f682c17de2f6f6
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
-rw-r--r-- | hw/board/CMakeLists.txt | 4 | ||||
-rw-r--r-- | hw/board/board.c | 2 | ||||
-rw-r--r-- | hw/common/common.h | 38 | ||||
-rw-r--r-- | hw/display/CMakeLists.txt | 4 | ||||
-rw-r--r-- | hw/display/display.c | 2 | ||||
-rw-r--r-- | hw/haptic/CMakeLists.txt | 4 | ||||
-rw-r--r-- | hw/haptic/gpio.c | 2 | ||||
-rw-r--r-- | hw/led/CMakeLists.txt | 4 | ||||
-rw-r--r-- | hw/led/led.c | 3 | ||||
-rw-r--r-- | hw/thermal/CMakeLists.txt | 4 | ||||
-rw-r--r-- | hw/thermal/thermal.c | 3 | ||||
-rw-r--r-- | hw/touchscreen/CMakeLists.txt | 4 | ||||
-rw-r--r-- | hw/touchscreen/touchscreen.c | 2 | ||||
-rw-r--r-- | hw/usb_gadget/CMakeLists.txt | 4 | ||||
-rw-r--r-- | hw/usb_gadget/usb_gadget.c | 3 | ||||
-rw-r--r-- | packaging/device-manager-plugin-artik.spec | 1 |
16 files changed, 16 insertions, 68 deletions
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 535bb13..d024e44 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 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 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 75ec356..8b255f8 100644 --- a/hw/display/display.c +++ b/hw/display/display.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 BACKLIGHT_PATH //#define BACKLIGHT_PATH "/sys/class/backlight/s6e36w1x01-bl" diff --git a/hw/haptic/CMakeLists.txt b/hw/haptic/CMakeLists.txt index 9671b52..d3b5d3c 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 capi-system-peripheral-io) diff --git a/hw/haptic/gpio.c b/hw/haptic/gpio.c index 67ba19a..0f8e3b9 100644 --- a/hw/haptic/gpio.c +++ b/hw/haptic/gpio.c @@ -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 diff --git a/hw/led/CMakeLists.txt b/hw/led/CMakeLists.txt index 8572342..607ef66 100644 --- a/hw/led/CMakeLists.txt +++ b/hw/led/CMakeLists.txt @@ -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}") diff --git a/hw/led/led.c b/hw/led/led.c index cb00e31..1549cac 100644 --- a/hw/led/led.c +++ b/hw/led/led.c @@ -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> 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 26930b1..29751c7 100644 --- a/hw/thermal/thermal.c +++ b/hw/thermal/thermal.c @@ -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" 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 4f2d97a..e80ab2e 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/usb_gadget/CMakeLists.txt b/hw/usb_gadget/CMakeLists.txt index 35e615e..c744e99 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 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 4b0a73c..8821a1a 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-artik.spec b/packaging/device-manager-plugin-artik.spec index cc8b514..0fa938f 100644 --- a/packaging/device-manager-plugin-artik.spec +++ b/packaging/device-manager-plugin-artik.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(capi-system-peripheral-io) BuildRequires: pkgconfig(libusbgx) |