pass: hal: Remove example code for hal implementation 38/168338/1
authorChanwoo Choi <cw00.choi@samsung.com>
Fri, 26 Jan 2018 01:24:18 +0000 (10:24 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 26 Jan 2018 01:24:18 +0000 (10:24 +0900)
Remove example code for hal implementation because example is not updated
constantly and pass-hal-standard.git has the well-made hal implementation
for all h/w resources which are controlled in PASS framework.

[1] https://git.tizen.org/cgit/platform/adaptation/pass-hal-standard/

Change-Id: I3ceb46aecfd11abebf2055d32e865e67d5bb7471
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/hal/hal-cpu-example.c [deleted file]

diff --git a/src/hal/hal-cpu-example.c b/src/hal/hal-cpu-example.c
deleted file mode 100644 (file)
index 6817d87..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * PASS HAL
- *
- * Copyright (c) 2017 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 requcpued 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 <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <pthread.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <linux/types.h>
-#include <linux/un.h>
-
-#include <pass/hal.h>
-
-
-static int get_curr_governor(char *res_name, char *governor)
-{
-       /* TODO */
-       return 0;
-}
-
-static int set_curr_governor(char *res_name, char *governor)
-{
-       /* TODO */
-       return 0;
-}
-
-static int get_avail_governor(char *res_name, char **avail_governor)
-{
-       /* TODO */
-       return 0;
-}
-
-static int get_curr_freq(char *res_name)
-{
-       /* TODO */
-       return 0;
-}
-
-static int get_min_freq(char *res_name)
-{
-       /* TODO */
-       return 0;
-}
-
-static int set_min_freq(char *res_name, int freq)
-{
-       /* TODO */
-       return 0;
-}
-
-static int get_max_freq(char *res_name)
-{
-       /* TODO */
-       return 0;
-}
-
-static int set_max_freq(char *res_name, int freq)
-{
-       /* TODO */
-       return 0;
-}
-
-static int get_up_threshold(char *res_name)
-{
-       /* TODO */
-       return 0;
-}
-
-static int set_up_threshold(char *res_name, int up_threshold)
-{
-       /* TODO */
-       return 0;
-}
-
-static int get_online_state(char *res_name, int cpu)
-{
-       /* TODO */
-       return 0;
-}
-
-static int set_online_state(char *res_name, int cpu, int on)
-{
-       /* TODO */
-       return 0;
-}
-
-static int get_tmu_temp(char *res_name)
-{
-       /* TODO */
-       return 0;
-}
-
-static int get_tmu_policy(char *res_name, char *policy)
-{
-       /* TODO */
-       return 0;
-}
-
-static int pass_open(struct pass_resource_info *info,
-                       struct pass_resource_common **common)
-{
-       struct pass_resource_cpu *res;
-
-       if (!info || !common)
-               return -EINVAL;
-
-       res = calloc(1, sizeof(*res));
-       if (!res)
-               return -ENOMEM;
-
-       res->common.info = info;
-
-       res->dvfs.get_curr_governor = get_curr_governor;
-       res->dvfs.set_curr_governor = set_curr_governor;
-       res->dvfs.get_avail_governor = get_avail_governor;
-       res->dvfs.get_curr_freq = get_curr_freq;
-       res->dvfs.get_min_freq = get_min_freq;
-       res->dvfs.set_min_freq = set_min_freq;
-       res->dvfs.get_max_freq = get_max_freq;
-       res->dvfs.set_max_freq = set_max_freq;
-       res->dvfs.get_up_threshold = get_up_threshold;
-       res->dvfs.set_up_threshold = set_up_threshold;
-
-       res->tmu.get_temp = get_tmu_temp;
-       res->tmu.get_policy = get_tmu_policy;
-
-       res->hotplug.get_online_state = get_online_state;
-       res->hotplug.set_online_state = set_online_state;
-
-       *common = (struct pass_resource_common *)res;
-       return 0;
-}
-
-static int pass_close(struct pass_resource_common *common)
-{
-       if (!common)
-               return -EINVAL;
-
-       free(common);
-       return 0;
-}
-
-HAL_MODULE_STRUCTURE = {
-       .magic = HAL_INFO_TAG,
-       .hal_version = HAL_INFO_VERSION,
-       .device_version = HARDWARE_INFO_VERSION_CPU,
-       .id = PASS_RESOURCE_CPU_ID,
-       .name = PASS_RESOURCE_CPU_NAME,
-       .open = pass_open,
-       .close = pass_close,
-};