xref: /wlan-driver/qcacld-3.0/core/hdd/inc/wlan_hdd_gpio_wakeup.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2020, The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef __WLAN_HDD_GPIO_WAKEUP_H__
18 #define __WLAN_HDD_GPIO_WAKEUP_H__
19 
20 #ifdef WLAN_ENABLE_GPIO_WAKEUP
21 /**
22  * wlan_hdd_gpio_wakeup_init() - Init gpio wakeup
23  * @hdd_ctx: pointer to the struct hdd_context
24  *
25  * Init gpio wakeup
26  *
27  * Return: success or not
28  */
29 int wlan_hdd_gpio_wakeup_init(struct hdd_context *hdd_ctx);
30 
31 /**
32  * wlan_hdd_gpio_wakeup_deinit() - Deinit gpio wakeup
33  * @hdd_ctx: pointer to the struct hdd_context
34  *
35  * Deinit gpio wakeup
36  *
37  * Return: success or not
38  */
39 int wlan_hdd_gpio_wakeup_deinit(struct hdd_context *hdd_ctx);
40 #else
wlan_hdd_gpio_wakeup_init(struct hdd_context * hdd_ctx)41 static inline int wlan_hdd_gpio_wakeup_init(struct hdd_context *hdd_ctx)
42 {
43 	return 0;
44 }
45 
wlan_hdd_gpio_wakeup_deinit(struct hdd_context * hdd_ctx)46 static inline int wlan_hdd_gpio_wakeup_deinit(struct hdd_context *hdd_ctx)
47 {
48 	return 0;
49 }
50 #endif
51 
52 #endif
53