xref: /wlan-driver/qcacld-3.0/components/pmo/dispatcher/inc/wlan_pmo_wow_pulse_cfg.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2012-2018, 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_WOW_PULSE_CFG_H__
20 #define WLAN_PMO_WOW_PULSE_CFG_H__
21 
22 #ifdef WLAN_FEATURE_WOW_PULSE
23 /*
24  * <ini>
25  * gwow_pulse_support - WOW pulse feature configuration
26  * @Min: 0
27  * @Max: 1
28  * @Default: 0
29  *
30  * When set to 1 WOW pulse feature will be enabled.
31  *
32  * Related: gwow_pulse_pin, gwow_pulse_interval_low, gwow_pulse_interval_high
33  *
34  * Supported Feature: WOW pulse
35  *
36  * Usage: External
37  *
38  * </ini>
39  */
40 #define CFG_PMO_WOW_PULSE_ENABLE CFG_INI_BOOL("gwow_pulse_support", \
41 					      0, \
42 					      "Enable wow pulse")
43 
44 /*
45  * <ini>
46  * gwow_pulse_pin - GPIO pin for WOW pulse
47  * @Min: 0
48  * @Max: 254
49  * @Default: 35
50  *
51  * Which PIN to send the Pulse
52  *
53  * Supported Feature: WOW pulse
54  *
55  * Usage: External
56  *
57  * </ini>
58  */
59 #define CFG_PMO_WOW_PULSE_PIN CFG_INI_UINT("gwow_pulse_pin", \
60 					   0, 254, 35, \
61 					   CFG_VALUE_OR_DEFAULT, \
62 					   "Pin for wow pulse")
63 
64 /*
65  * <ini>
66  * gwow_pulse_interval_low - Pulse interval low
67  * @Min: 160
68  * @Max: 480
69  * @Default: 180
70  *
71  * The interval of low level in the pulse
72  *
73  * Supported Feature: WOW pulse
74  *
75  * Usage: External
76  *
77  * </ini>
78  */
79 #define CFG_PMO_WOW_PULSE_LOW CFG_INI_UINT("gwow_pulse_interval_low", \
80 					   160, 480, 180, \
81 					   CFG_VALUE_OR_DEFAULT, \
82 					   "Interval of low pulse")
83 
84 /*
85  * <ini>
86  * gwow_pulse_interval_high - Pulse interval high
87  * @Min: 20
88  * @Max: 40
89  * @Default: 20
90  *
91  * The interval of high level in the pulse
92  *
93  * Supported Feature: WOW pulse
94  *
95  * Usage: External
96  *
97  * </ini>
98  */
99 #define CFG_PMO_WOW_PULSE_HIGH CFG_INI_UINT("gwow_pulse_interval_high", \
100 					    20, 40, 20, \
101 					    CFG_VALUE_OR_DEFAULT, \
102 					    "Interval of high pulse")
103 
104 /*
105  * <ini>
106  * gwow_pulse_repeat_count - wow pulse repetition count
107  * @Min: 1
108  * @Max: 0xffffffff
109  * @Default: 1
110  *
111  * The repeat count of wow pin wave.
112  * Level low to level high is one time, 0xffffffff means endless.
113  *
114  * Supported Feature: WOW pulse
115  *
116  * Usage: External
117  *
118  * </ini>
119  */
120 #define CFG_PMO_WOW_PULSE_REPEAT CFG_INI_UINT("gwow_pulse_repeat_count", \
121 					      1, 0xffffffff, 1, \
122 					      CFG_VALUE_OR_DEFAULT, \
123 					      "Pulse repetition count")
124 
125 /*
126  * <ini>
127  * gwow_pulse_init_state - wow pulse init level
128  * @Min: 0
129  * @Max: 1
130  * @Default: 0
131  *
132  * The init level of wow pin, 1 is high level, 0 is low level.
133  *
134  * Supported Feature: WOW pulse
135  *
136  * Usage: External
137  *
138  * </ini>
139  */
140 #define CFG_PMO_WOW_PULSE_INIT CFG_INI_UINT("gwow_pulse_init_state", \
141 					    0, 1, 1, \
142 					    CFG_VALUE_OR_DEFAULT, \
143 					    "Pulse init level")
144 
145 #define CFG_WOW_PULSE_ALL \
146 	CFG(CFG_PMO_WOW_PULSE_ENABLE) \
147 	CFG(CFG_PMO_WOW_PULSE_PIN) \
148 	CFG(CFG_PMO_WOW_PULSE_LOW) \
149 	CFG(CFG_PMO_WOW_PULSE_HIGH) \
150 	CFG(CFG_PMO_WOW_PULSE_REPEAT) \
151 	CFG(CFG_PMO_WOW_PULSE_INIT)
152 #else
153 #define CFG_WOW_PULSE_ALL
154 #endif /* WLAN_FEATURE_WOW_PULSE */
155 #endif /* WLAN_PMO_WOW_PULSE_CFG_H__ */
156