aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mpu3050/mlos-kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/mpu3050/mlos-kernel.c')
-rw-r--r--drivers/misc/mpu3050/mlos-kernel.c89
1 files changed, 89 insertions, 0 deletions
diff --git a/drivers/misc/mpu3050/mlos-kernel.c b/drivers/misc/mpu3050/mlos-kernel.c
new file mode 100644
index 00000000000..ced9ba4f6f3
--- /dev/null
+++ b/drivers/misc/mpu3050/mlos-kernel.c
@@ -0,0 +1,89 @@
1/*
2 $License:
3 Copyright (C) 2010 InvenSense Corporation, All Rights Reserved.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 $
18 */
19/**
20 * @defgroup
21 * @brief
22 *
23 * @{
24 * @file mlos-kernel.c
25 * @brief
26 *
27 *
28 */
29
30#include "mlos.h"
31#include <linux/delay.h>
32#include <linux/slab.h>
33
34void *MLOSMalloc(unsigned int numBytes)
35{
36 return kmalloc(numBytes, GFP_KERNEL);
37}
38
39tMLError MLOSFree(void *ptr)
40{
41 kfree(ptr);
42 return ML_SUCCESS;
43}
44
45tMLError MLOSCreateMutex(HANDLE *mutex)
46{
47 /* @todo implement if needed */
48 return ML_ERROR_FEATURE_NOT_IMPLEMENTED;
49}
50
51tMLError MLOSLockMutex(HANDLE mutex)
52{
53 /* @todo implement if needed */
54 return ML_ERROR_FEATURE_NOT_IMPLEMENTED;
55}
56
57tMLError MLOSUnlockMutex(HANDLE mutex)
58{
59 /* @todo implement if needed */
60 return ML_ERROR_FEATURE_NOT_IMPLEMENTED;
61}
62
63tMLError MLOSDestroyMutex(HANDLE handle)
64{
65 /* @todo implement if needed */
66 return ML_ERROR_FEATURE_NOT_IMPLEMENTED;
67}
68
69FILE *MLOSFOpen(char *filename)
70{
71 /* @todo implement if needed */
72 return NULL;
73}
74
75void MLOSFClose(FILE *fp)
76{
77 /* @todo implement if needed */
78}
79
80void MLOSSleep(int mSecs)
81{
82 msleep(mSecs);
83}
84
85unsigned long MLOSGetTickCount(void)
86{
87 /* @todo implement if needed */
88 return ML_ERROR_FEATURE_NOT_IMPLEMENTED;
89}