xref: /wlan-driver/qcacld-3.0/components/pmo/dispatcher/inc/wlan_pmo_gpio_wakeup_cfg.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
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef WLAN_PMO_GPIO_WAKEUP_CFG_H__
20 #define WLAN_PMO_GPIO_WAKEUP_CFG_H__
21 
22 #ifdef WLAN_ENABLE_GPIO_WAKEUP
23 /*
24  * <ini>
25  * genable_gpio_wakeup - Enable gpio wakeup
26  * @Min: 0
27  * @Max: 1
28  * @Default: 0
29  *
30  * Enable gpio wakeup
31  *
32  * Supported Feature: gpio wakeup
33  *
34  * Usage: External
35  *
36  * </ini>
37  */
38 #define CFG_PMO_ENABLE_GPIO_WAKEUP CFG_INI_BOOL("genable_gpio_wakeup", \
39 						0, \
40 						"Enable gpio wakeup")
41 
42 /*
43  * <ini>
44  * ggpio_wakeup_pin - Wakeup gpio pin of host platform
45  * @Min: 0
46  * @Max: 255
47  * @Default: 255
48  *
49  * Wakeup gpio pin of host platform
50  *
51  * Supported Feature: gpio wakeup
52  *
53  * Usage: External
54  *
55  * </ini>
56  */
57 #define CFG_PMO_GPIO_WAKEUP_PIN CFG_INI_UINT("ggpio_wakeup_pin", \
58 					     0, 255, 255, \
59 					     CFG_VALUE_OR_DEFAULT, \
60 					     "Wakeup gpio pin of host platform")
61 
62 /*
63  * <ini>
64  * ggpio_wakeup_mode - Wakeup gpio mode
65  * @Min: 0
66  * @Max: 4
67  * @Default: 0
68  *
69  * Wakeup gpio mode
70  * 1 indicates rising trigger
71  * 2 indicates failing trigger
72  * 3 indicates high trigger
73  * 4 indicates low trigger
74  *
75  * Supported Feature: gpio wakeup
76  *
77  * Usage: External
78  *
79  * </ini>
80  */
81 #define CFG_PMO_GPIO_WAKEUP_MODE CFG_INI_UINT("ggpio_wakeup_mode", \
82 					      0, 4, 0, \
83 					      CFG_VALUE_OR_DEFAULT, \
84 					      "Wakeup gpio mode")
85 
86 #define CFG_GPIO_WAKEUP_ALL \
87 	CFG(CFG_PMO_ENABLE_GPIO_WAKEUP) \
88 	CFG(CFG_PMO_GPIO_WAKEUP_PIN) \
89 	CFG(CFG_PMO_GPIO_WAKEUP_MODE)
90 #else
91 #define CFG_GPIO_WAKEUP_ALL
92 #endif /* WLAN_ENABLE_GPIO_WAKEUP */
93 #endif /* WLAN_PMO_GPIO_WAKEUP_CFG_H__ */
94