diff options
author | INSUN PYO <insun.pyo@samsung.com> | 2018-02-22 16:31:34 +0900 |
---|---|---|
committer | INSUN PYO <insun.pyo@samsung.com> | 2018-02-22 16:33:45 +0900 |
commit | 83e5a7f3d004f48850d08510622840e5e3776ac7 (patch) | |
tree | 7920a9ed289de0ae53f0d3ecbc6eb4a2556d0f27 | |
parent | 8e9553eb8f68f7bb6670b157ae68cb8ec7b93fd2 (diff) | |
download | device-manager-plugin-odroid-83e5a7f3d004f48850d08510622840e5e3776ac7.tar.gz device-manager-plugin-odroid-83e5a7f3d004f48850d08510622840e5e3776ac7.tar.bz2 device-manager-plugin-odroid-83e5a7f3d004f48850d08510622840e5e3776ac7.zip |
display: add dummy HAL for unified devicedsubmit/tizen/20180223.015425accepted/tizen/unified/20180223.062113
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I0822e7be4015f96429e04c06b78fcf23a45665f8
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rwxr-xr-x | hw/display/CMakeLists.txt | 19 | ||||
-rwxr-xr-x | hw/display/display.c | 49 |
3 files changed, 69 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 14ad48e..4858e21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,5 +3,6 @@ PROJECT(device-manager-odroid C) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) +ADD_SUBDIRECTORY(hw/display) ADD_SUBDIRECTORY(hw/usb_gadget) ADD_SUBDIRECTORY(hw/usb_client) diff --git a/hw/display/CMakeLists.txt b/hw/display/CMakeLists.txt new file mode 100755 index 0000000..ebccfbe --- /dev/null +++ b/hw/display/CMakeLists.txt @@ -0,0 +1,19 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(display C) + +SET(PREFIX ${CMAKE_INSTALL_PREFIX}) + +INCLUDE(FindPkgConfig) +pkg_check_modules(display_pkgs REQUIRED hwcommon dlog) + +FOREACH(flag ${display_pkgs_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") + +ADD_LIBRARY(${PROJECT_NAME} MODULE display.c ../shared.c) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${display_pkgs_LDFLAGS}) +SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "") +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR}/hw COMPONENT RuntimeLibraries) diff --git a/hw/display/display.c b/hw/display/display.c new file mode 100755 index 0000000..8869ec9 --- /dev/null +++ b/hw/display/display.c @@ -0,0 +1,49 @@ +/* + * device-node + * + * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * + * 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. + */ + +#include <stdio.h> +#include <errno.h> +#include <hw/display.h> + +static int display_open(struct hw_info *info, + const char *id, struct hw_common **common) +{ + if (!info || !common) + return -EINVAL; + + *common = NULL; + return 0; +} + +static int display_close(struct hw_common *common) +{ + if (common) /* we use NULL display_dev */ + return -EINVAL; + + return 0; +} + +HARDWARE_MODULE_STRUCTURE = { + .magic = HARDWARE_INFO_TAG, + .hal_version = HARDWARE_INFO_VERSION, + .device_version = DISPLAY_HARDWARE_DEVICE_VERSION, + .id = DISPLAY_HARDWARE_DEVICE_ID, + .name = "Display", + .open = display_open, + .close = display_close, +}; |