tizen 2.3 release
[framework/system/deviced.git] / src / tima / tima.c
1 /*
2  * TIMA(TZ based Integrity Measurement Architecture)
3  *
4  * Copyright (c) 2013 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the License);
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 #include <stdio.h>
20 #include <assert.h>
21 #include <limits.h>
22 #include <libudev.h>
23 #include <Ecore.h>
24
25 #include "core/log.h"
26 #include "core/common.h"
27 #include "core/devices.h"
28 #include "core/udev.h"
29
30 #include "tima-lkm.h"
31 #include "tima-pkm.h"
32
33 static void tima_init(void *data)
34 {
35         tima_lkm_init();
36         tima_pkm_init();
37 }
38
39 static void tima_exit(void *data)
40 {
41         tima_lkm_exit();
42         tima_pkm_exit();
43 }
44
45 static const struct device_ops tima_device_ops = {
46         .priority = DEVICE_PRIORITY_NORMAL,
47         .name     = "tima",
48         .init     = tima_init,
49         .exit     = tima_exit,
50 };
51
52 DEVICE_OPS_REGISTER(&tima_device_ops)