1 /*
2  * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: qdf_module.h
22  * This file abstracts "kernel module" semantics.
23  */
24 
25 #ifndef _QDF_MODULE_H
26 #define _QDF_MODULE_H
27 
28 #include <i_qdf_module.h>
29 
30 typedef uint32_t (*module_init_func_t)(void);
31 
32 /**
33  * qdf_virt_module_init - Specify the module's entry point.
34  * @_mod_init_func: module entry function
35  */
36 #define qdf_virt_module_init(_mod_init_func) \
37 	__qdf_virt_module_init(_mod_init_func)
38 
39 /**
40  * qdf_virt_module_exit() - Specify the module's exit point.
41  * @_mod_exit_func: module exit function
42  */
43 #define qdf_virt_module_exit(_mod_exit_func) \
44 	__qdf_virt_module_exit(_mod_exit_func)
45 
46 /**
47  * qdf_virt_module_name() - Specify the module's name.
48  * @_name: module name
49  */
50 #define qdf_virt_module_name(_name)      __qdf_virt_module_name(_name)
51 
52 
53 /**
54  * qdf_export_symbol() - Export a symbol from a module.
55  * @_sym: symbol to export
56  */
57 #define qdf_export_symbol(_sym)         __qdf_export_symbol(_sym)
58 
59 /**
60  * qdf_declare_param() - Declare a module parameter.
61  * @name: name of the parameter
62  * @_type: type of the parameter
63  */
64 #define qdf_declare_param(name, _type) __qdf_declare_param(name, _type)
65 
66 /**
67  * qdf_declare_param_array() - Declare a module parameter that is an array
68  * @name: name of the array
69  * @_type: type of the array element
70  * @_num: number of entries written
71  */
72 #define qdf_declare_param_array(name, _type, _num) \
73 	__qdf_declare_param_array(name, _type, _num)
74 
75 #endif /*_QDF_MODULE_H*/
76