blob: b23bf79f499f059b39aad994c9ed1d782b124fb5 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lamaa8e15a2014-02-11 23:30:06 -08002 * Copyright (c) 2012-2013 Qualcomm Atheros, Inc.
3 * All Rights Reserved.
4 * Qualcomm Atheros Confidential and Proprietary.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08005 */
Jeff Johnson295189b2012-06-20 16:38:30 -07006/*!
7 @file
8 vos_power.c
9
10 @brief
11 This is the interface to VOSS power APIs using for power management
12 of the WLAN Libra module from the MSM PMIC. These implementation of
13 these APIs is very target dependent, also these APIs should only be
14 used when the WLAN Libra module is powered from the MSM PMIC and not
15 from an external independent power source
16
17*/
18
19/*===========================================================================
20
21 Copyright (c) 2008 QUALCOMM Incorporated. All Rights Reserved
22
23 Qualcomm Proprietary
24
25 Export of this technology or software is regulated by the U.S. Government.
26 Diversion contrary to U.S. law prohibited.
27
28 All ideas, data and information contained in or disclosed by
29 this document are confidential and proprietary information of
30 QUALCOMM Incorporated and all rights therein are expressly reserved.
31 By accepting this material the recipient agrees that this material
32 and the information contained therein are held in confidence and in
33 trust and will not be used, copied, reproduced in whole or in part,
34 nor its contents revealed in any manner to others without the express
35 written permission of QUALCOMM Incorporated.
36
37===========================================================================*/
38
39/*===========================================================================
40
41 EDIT HISTORY FOR MODULE
42
43This section contains comments describing changes made to the module.
44Notice that changes are listed in reverse chronological order.
45
46$Header: $
47
48when who what, where, why
49-------- --- ----------------------------------------------------------
50
51===========================================================================*/
52
53/*===========================================================================
54
55 INCLUDE FILES
56
57===========================================================================*/
58#include <vos_power.h>
59
Jeff Johnson295189b2012-06-20 16:38:30 -070060#ifdef MSM_PLATFORM
61#include <mach/mpp.h>
62#include <mach/vreg.h>
63#include <linux/err.h>
64#include <linux/delay.h>
Jeff Johnson295189b2012-06-20 16:38:30 -070065#endif //MSM_PLATFORM
66
67#include <vos_sched.h>
68
69//To work around issues of fail to turn WIFI back on after turning it off
70#define VOS_PWR_WIFI_ON_OFF_HACK
71#ifdef VOS_PWR_WIFI_ON_OFF_HACK
72#define VOS_PWR_SLEEP(ms) msleep(ms)
73#else
74#define VOS_PWR_SLEEP(ms)
75#endif
76
77/*===========================================================================
78
79 DEFINITIONS AND TYPES
80
81===========================================================================*/
82
83#define CHIP_POWER_ON 1
84#define CHIP_POWER_OFF 0
85
86// SDIO Config Cycle Clock Frequency
87#define WLAN_LOW_SD_CONFIG_CLOCK_FREQ 400000
88
Jeff Johnson295189b2012-06-20 16:38:30 -070089/*===========================================================================
90
91 FUNCTION PROTOTYPES
92
93===========================================================================*/
94
95/**
96 @brief vos_chipPowerUp() - This API will power up the Libra chip
97
98 This operation may be asynchronous. If so, the supplied callback will
99 be invoked when operation is complete with the result. The callback will
100 be called with the user supplied data. If the operation is known to be
101 sync, there is no need to supply a callback and user data.
102
103 The Libra SDIO core will have been initialized if the operation completes
104 successfully
105
106 @param status [out] : whether this operation will complete sync or async
107 @param callback [in] : user supplied callback invoked when operation completes
108 @param user_data [in] : user supplied context callback is called with
109
110 @return
111 VOS_STATUS_E_INVAL - status is NULL
112 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
113 and user_data has not been specified (status will be
114 set to VOS_CALL_ASYNC)
115 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
116 is already in progress (status will be set to VOS_CALL_ASYNC)
117 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately)
118 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
119 OR operation started successfully if status is ASYNC (will be set)
120
121*/
122VOS_STATUS vos_chipPowerUp
123(
124 vos_call_status_type* status,
125 vos_power_cb_type callback,
126 v_PVOID_t user_data
127)
128{
Jeff Johnson295189b2012-06-20 16:38:30 -0700129 return VOS_STATUS_SUCCESS;
130}
131
132/**
133 @brief vos_chipPowerDown() - This API will power down the Libra chip
134
135 This operation may be asynchronous. If so, the supplied callback will
136 be invoked when operation is complete with the result. The callback will
137 be called with the user supplied data. If the operation is known to be
138 sync, there is no need to supply a callback and user data.
139
140 @param status [out] : whether this operation will complete sync or async
141 @param callback [in] : user supplied callback invoked when operation completes
142 @param user_data [in] : user supplied context callback is called with
143
144 @return
145 VOS_STATUS_E_INVAL - status is NULL
146 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
147 and user_data has not been specified (status will be
148 set to VOS_CALL_ASYNC)
149 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
150 is already in progress (status will be set to VOS_CALL_ASYNC)
151 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately)
152 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
153 OR operation started successfully if status is ASYNC (will be set)
154
155*/
156VOS_STATUS vos_chipPowerDown
157(
158 vos_call_status_type* status,
159 vos_power_cb_type callback,
160 v_PVOID_t user_data
161)
162{
Jeff Johnson295189b2012-06-20 16:38:30 -0700163 return VOS_STATUS_SUCCESS;
164}
165
166/**
167 @brief vos_chipReset() - This API will reset the Libra chip
168
169 This operation may be asynchronous. If so, the supplied callback will
170 be invoked when operation is complete with the result. The callback will
171 be called with the user supplied data. If the operation is known to be
172 sync, there is no need to supply a callback and user data.
173
174 A hard reset will involve a powerDown followed by a PowerUp; a soft reset
175 can potentially be accomplished by writing to some device registers
176
177 The Libra SDIO core will have been initialized if the operation completes
178 successfully
179
180 @param status [out] : whether this operation will complete sync or async
181 @param soft [in] : VOS_TRUE if a soft reset is desired
182 VOS_FALSE for a hard reset i.e. powerDown followed by powerUp
183 @param callback [in] : user supplied callback invoked when operation completes
184 @param user_data [in] : user supplied context callback is called with
185
186 @return
187 VOS_STATUS_E_INVAL - status is NULL
188 VOS_STATUS_E_NOSUPPORT - soft reset asked for but not supported
189 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
190 and user_data has not been specified (status will be
191 set to VOS_CALL_ASYNC)
192 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
193 is already in progress (status will be set to VOS_CALL_ASYNC)
194 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately)
195 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
196 OR operation started successfully if status is ASYNC (will be set)
197
198*/
199VOS_STATUS vos_chipReset
200(
201 vos_call_status_type* status,
202 v_BOOL_t soft,
203 vos_power_cb_type callback,
204 v_PVOID_t user_data,
205 vos_chip_reset_reason_type reason
206)
207{
208 VOS_STATUS vstatus;
209 vstatus = vos_watchdog_chip_reset(reason);
210 return vstatus;
211}
212
213
214/**
215 @brief vos_chipVoteOnPASupply() - This API will power up the PA supply
216
217 This operation may be asynchronous. If so, the supplied callback will
218 be invoked when operation is complete with the result. The callback will
219 be called with the user supplied data. If the operation is known to be
220 sync, there is no need to supply a callback and user data.
221
222 @param status [out] : whether this operation will complete sync or async
223 @param callback [in] : user supplied callback invoked when operation completes
224 @param user_data [in] : user supplied context callback is called with
225
226 @return
227 VOS_STATUS_E_INVAL - status is NULL
228 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
229 and user_data has not been specified (status will be
230 set to VOS_CALL_ASYNC)
231 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
232 is already in progress (status will be set to VOS_CALL_ASYNC)
233 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately)
234 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
235 OR operation started successfully if status is ASYNC (will be set)
236
237*/
238VOS_STATUS vos_chipVoteOnPASupply
239(
240 vos_call_status_type* status,
241 vos_power_cb_type callback,
242 v_PVOID_t user_data
243)
244{
245 return VOS_STATUS_SUCCESS;
246}
247
248
249/**
250 @brief vos_chipVoteOffPASupply() - This API will vote to turn off the
251 PA supply. Even if we succeed in voting, there is a chance PA supply will not
252 be turned off. This will be treated the same as a failure.
253
254 This operation may be asynchronous. If so, the supplied callback will
255 be invoked when operation is complete with the result. The callback will
256 be called with the user supplied data. If the operation is known to be
257 sync, there is no need to supply a callback and user data.
258
259 @param status [out] : whether this operation will complete sync or async
260 @param callback [in] : user supplied callback invoked when operation completes
261 @param user_data [in] : user supplied context callback is called with
262
263 @return
264 VOS_STATUS_E_INVAL - status is NULL
265 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
266 and user_data has not been specified (status will be
267 set to VOS_CALL_ASYNC)
268 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
269 is already in progress (status will be set to VOS_CALL_ASYNC)
270 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be
271 because the voting algorithm decided not to power down PA
272 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
273 OR operation started successfully if status is ASYNC (will be set)
274
275*/
276VOS_STATUS vos_chipVoteOffPASupply
277(
278 vos_call_status_type* status,
279 vos_power_cb_type callback,
280 v_PVOID_t user_data
281)
282{
283 return VOS_STATUS_SUCCESS;
284}
285
286
287/**
288 @brief vos_chipAssertDeepSleep() - This API will assert the deep
289 sleep signal to Libra
290
291 This operation may be asynchronous. If so, the supplied callback will
292 be invoked when operation is complete with the result. The callback will
293 be called with the user supplied data. If the operation is known to be
294 sync, there is no need to supply a callback and user data.
295
296 @param status [out] : whether this operation will complete sync or async
297 @param callback [in] : user supplied callback invoked when operation completes
298 @param user_data [in] : user supplied context callback is called with
299
300 @return
301 VOS_STATUS_E_INVAL - status is NULL
302 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
303 and user_data has not been specified (status will be
304 set to VOS_CALL_ASYNC)
305 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
306 is already in progress (status will be set to VOS_CALL_ASYNC)
307 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately)
308 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
309 OR operation started successfully if status is ASYNC (will be set)
310
311*/
312VOS_STATUS vos_chipAssertDeepSleep
313(
314 vos_call_status_type* status,
315 vos_power_cb_type callback,
316 v_PVOID_t user_data
317)
318{
Jeff Johnson295189b2012-06-20 16:38:30 -0700319 return VOS_STATUS_SUCCESS;
320}
321
322
323/**
324 @brief vos_chipDeAssertDeepSleep() - This API will de-assert the deep sleep
325 signal to Libra
326
327 This operation may be asynchronous. If so, the supplied callback will
328 be invoked when operation is complete with the result. The callback will
329 be called with the user supplied data. If the operation is known to be
330 sync, there is no need to supply a callback and user data.
331
332 @param status [out] : whether this operation will complete sync or async
333 @param callback [in] : user supplied callback invoked when operation completes
334 @param user_data [in] : user supplied context callback is called with
335
336 @return
337 VOS_STATUS_E_INVAL - status is NULL
338 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
339 and user_data has not been specified (status will be
340 set to VOS_CALL_ASYNC)
341 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
342 is already in progress (status will be set to VOS_CALL_ASYNC)
343 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately)
344 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
345 OR operation started successfully if status is ASYNC (will be set)
346
347*/
348VOS_STATUS vos_chipDeAssertDeepSleep
349(
350 vos_call_status_type* status,
351 vos_power_cb_type callback,
352 v_PVOID_t user_data
353)
354{
Jeff Johnson295189b2012-06-20 16:38:30 -0700355 return VOS_STATUS_SUCCESS;
356}
357
358/**
359 @brief vos_chipExitDeepSleepVREGHandler() - This API will initialize the required VREG
360 after exit from deep sleep.
361
362 This operation may be asynchronous. If so, the supplied callback will
363 be invoked when operation is complete with the result. The callback will
364 be called with the user supplied data. If the operation is known to be
365 sync, there is no need to supply a callback and user data.
366
367 @param status [out] : whether this operation will complete sync or async
368 @param callback [in] : user supplied callback invoked when operation completes
369 @param user_data [in] : user supplied context callback is called with
370
371 @return
372 VOS_STATUS_E_INVAL - status is NULL
373 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
374 and user_data has not been specified (status will be
375 set to VOS_CALL_ASYNC)
376 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
377 is already in progress (status will be set to VOS_CALL_ASYNC)
378 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately)
379 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
380 OR operation started successfully if status is ASYNC (will be set)
381
382*/
383VOS_STATUS vos_chipExitDeepSleepVREGHandler
384(
385 vos_call_status_type* status,
386 vos_power_cb_type callback,
387 v_PVOID_t user_data
388)
389{
Jeff Johnson295189b2012-06-20 16:38:30 -0700390 return VOS_STATUS_SUCCESS;
391}
392
393/**
394 @brief vos_chipVoteOnRFSupply() - This API will power up the RF supply
395
396 This operation may be asynchronous. If so, the supplied callback will
397 be invoked when operation is complete with the result. The callback will
398 be called with the user supplied data. If the operation is known to be
399 sync, there is no need to supply a callback and user data.
400
401 @param status [out] : whether this operation will complete sync or async
402 @param callback [in] : user supplied callback invoked when operation completes
403 @param user_data [in] : user supplied context callback is called with
404
405 @return
406 VOS_STATUS_E_INVAL - status is NULL
407 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
408 and user_data has not been specified (status will be
409 set to VOS_CALL_ASYNC)
410 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
411 is already in progress (status will be set to VOS_CALL_ASYNC)
412 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately)
413 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
414 OR operation started successfully if status is ASYNC (will be set)
415
416*/
417VOS_STATUS vos_chipVoteOnRFSupply
418(
419 vos_call_status_type* status,
420 vos_power_cb_type callback,
421 v_PVOID_t user_data
422)
423{
Jeff Johnson295189b2012-06-20 16:38:30 -0700424 return VOS_STATUS_SUCCESS;
425}
426
427/**
428 @brief vos_chipVoteOffRFSupply() - This API will vote to turn off the
429 RF supply. Even if we succeed in voting, there is a chance RF supply will not
430 be turned off as RF rails could be shared with other modules (outside WLAN)
431
432 This operation may be asynchronous. If so, the supplied callback will
433 be invoked when operation is complete with the result. The callback will
434 be called with the user supplied data. If the operation is known to be
435 sync, there is no need to supply a callback and user data.
436
437 @param status [out] : whether this operation will complete sync or async
438 @param callback [in] : user supplied callback invoked when operation completes
439 @param user_data [in] : user supplied context callback is called with
440
441 @return
442 VOS_STATUS_E_INVAL - status is NULL
443 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
444 and user_data has not been specified (status will be
445 set to VOS_CALL_ASYNC)
446 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
447 is already in progress (status will be set to VOS_CALL_ASYNC)
448 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be
449 because the voting algorithm decided not to power down PA
450 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
451 OR operation started successfully if status is ASYNC (will be set)
452
453*/
454VOS_STATUS vos_chipVoteOffRFSupply
455(
456 vos_call_status_type* status,
457 vos_power_cb_type callback,
458 v_PVOID_t user_data
459)
460{
Jeff Johnson295189b2012-06-20 16:38:30 -0700461 return VOS_STATUS_SUCCESS;
462}
463
464/**
465 @brief vos_chipVoteOnBBAnalogSupply() - This API will power up the I/P voltage
466 used by Base band Analog.
467
468 This operation may be asynchronous. If so, the supplied callback will
469 be invoked when operation is complete with the result. The callback will
470 be called with the user supplied data. If the operation is known to be
471 sync, there is no need to supply a callback and user data.
472
473 @param status [out] : whether this operation will complete sync or async
474 @param callback [in] : user supplied callback invoked when operation completes
475 @param user_data [in] : user supplied context callback is called with
476
477 @return
478 VOS_STATUS_E_INVAL - status is NULL
479 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
480 and user_data has not been specified (status will be
481 set to VOS_CALL_ASYNC)
482 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
483 is already in progress (status will be set to VOS_CALL_ASYNC)
484 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately)
485 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
486 OR operation started successfully if status is ASYNC (will be set)
487
488*/
489VOS_STATUS vos_chipVoteOnBBAnalogSupply
490(
491 vos_call_status_type* status,
492 vos_power_cb_type callback,
493 v_PVOID_t user_data
494)
495{
Jeff Johnson295189b2012-06-20 16:38:30 -0700496 return VOS_STATUS_SUCCESS;
497}
498
499/**
500 @brief vos_chipVoteOffBBAnalogSupply() - This API will vote off the BB Analog supply.
501
502 This operation may be asynchronous. If so, the supplied callback will
503 be invoked when operation is complete with the result. The callback will
504 be called with the user supplied data. If the operation is known to be
505 sync, there is no need to supply a callback and user data.
506
507 @param status [out] : whether this operation will complete sync or async
508 @param callback [in] : user supplied callback invoked when operation completes
509 @param user_data [in] : user supplied context callback is called with
510
511 @return
512 VOS_STATUS_E_INVAL - status is NULL
513 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
514 and user_data has not been specified (status will be
515 set to VOS_CALL_ASYNC)
516 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
517 is already in progress (status will be set to VOS_CALL_ASYNC)
518 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be
519 because the voting algorithm decided not to power down PA
520 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
521 OR operation started successfully if status is ASYNC (will be set)
522
523*/
524VOS_STATUS vos_chipVoteOffBBAnalogSupply
525(
526 vos_call_status_type* status,
527 vos_power_cb_type callback,
528 v_PVOID_t user_data
529)
530{
Jeff Johnson295189b2012-06-20 16:38:30 -0700531 return VOS_STATUS_SUCCESS;
532}
533
534/**
535 @brief vos_chipVoteOnXOBuffer() - This API will vote to turn on the XO buffer from
536 PMIC. This API will be used when Libra uses the TCXO from PMIC on the MSM
537
538 This operation may be asynchronous. If so, the supplied callback will
539 be invoked when operation is complete with the result. The callback will
540 be called with the user supplied data. If the operation is known to be
541 sync, there is no need to supply a callback and user data.
542
543 @param status [out] : whether this operation will complete sync or async
544 @param callback [in] : user supplied callback invoked when operation completes
545 @param user_data [in] : user supplied context callback is called with
546
547 @return
548 VOS_STATUS_E_INVAL - status is NULL
549 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
550 and user_data has not been specified (status will be
551 set to VOS_CALL_ASYNC)
552 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
553 is already in progress (status will be set to VOS_CALL_ASYNC)
554 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately)
555 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
556 OR operation started successfully if status is ASYNC (will be set)
557
558*/
559VOS_STATUS vos_chipVoteOnXOBuffer
560(
561 vos_call_status_type* status,
562 vos_power_cb_type callback,
563 v_PVOID_t user_data
564)
565{
566 return VOS_STATUS_SUCCESS;
567}
568
569/**
570 @brief vos_chipVoteOffXOBuffer() - This API will vote off PMIC XO buffer.
571
572 This operation may be asynchronous. If so, the supplied callback will
573 be invoked when operation is complete with the result. The callback will
574 be called with the user supplied data. If the operation is known to be
575 sync, there is no need to supply a callback and user data.
576
577 @param status [out] : whether this operation will complete sync or async
578 @param callback [in] : user supplied callback invoked when operation completes
579 @param user_data [in] : user supplied context callback is called with
580
581 @return
582 VOS_STATUS_E_INVAL - status is NULL
583 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
584 and user_data has not been specified (status will be
585 set to VOS_CALL_ASYNC)
586 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
587 is already in progress (status will be set to VOS_CALL_ASYNC)
588 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be
589 because the voting algorithm decided not to power down PA
590 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
591 OR operation started successfully if status is ASYNC (will be set)
592
593*/
594VOS_STATUS vos_chipVoteOffXOBuffer
595(
596 vos_call_status_type* status,
597 vos_power_cb_type callback,
598 v_PVOID_t user_data
599)
600{
601 return VOS_STATUS_SUCCESS;
602}
603
604/**
605 @brief vos_chipVoteXOCore - This API will vote PMIC XO Core.
606
607 This operation may be asynchronous. If so, the supplied callback will
608 be invoked when operation is complete with the result. The callback will
609 be called with the user supplied data. If the operation is known to be
610 sync, there is no need to supply a callback and user data.
611
612 @param status [out] : whether this operation will complete sync or async
613 @param callback [in] : user supplied callback invoked when operation completes
614 @param user_data [in] : user supplied context callback is called with
615 @param force_enable [in] : Force enable XO CORE or not
616
617 @return
618 VOS_STATUS_E_INVAL - status is NULL
619 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
620 and user_data has not been specified (status will be
621 set to VOS_CALL_ASYNC)
622 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
623 is already in progress (status will be set to VOS_CALL_ASYNC)
624 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be
625 because the voting algorithm decided not to power down PA
626 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
627 OR operation started successfully if status is ASYNC (will be set)
628
629*/
630VOS_STATUS vos_chipVoteXOCore
631(
632 vos_call_status_type* status,
633 vos_power_cb_type callback,
634 v_PVOID_t user_data,
635 v_BOOL_t force_enable
636)
637{
Jeff Johnson295189b2012-06-20 16:38:30 -0700638
639 return VOS_STATUS_SUCCESS;
640}
641
642
643/**
644 @brief vos_chipVoteFreqFor1p3VSupply() - This API will vote for frequency for 1.3V RF supply.
645
646 This operation may be asynchronous. If so, the supplied callback will
647 be invoked when operation is complete with the result. The callback will
648 be called with the user supplied data. If the operation is known to be
649 sync, there is no need to supply a callback and user data.
650
651 EVM issue is observed with 1.6Mhz freq for 1.3V supply in wlan standalone case.
652 During concurrent operation (e.g. WLAN and WCDMA) this issue is not observed.
653 To workaround, wlan will vote for 3.2Mhz during startup and will vote for 1.6Mhz
654 during exit.
655
656 @param status [out] : whether this operation will complete sync or async
657 @param callback [in] : user supplied callback invoked when operation completes
658 @param user_data [in] : user supplied context callback is called with
659 @param freq [in] : Frequency for 1.3V Supply for which WLAN driver needs to vote for.
660 @return
661 VOS_STATUS_E_INVAL - status is NULL
662 VOS_STATUS_E_FAULT - the operation needs to complete async and a callback
663 and user_data has not been specified (status will be
664 set to VOS_CALL_ASYNC)
665 VOS_STATUS_E_ALREADY - operation needs to complete async but another request
666 is already in progress (status will be set to VOS_CALL_ASYNC)
667 VOS_STATUS_E_FAILURE - operation failed (status will be set appropriately) could be
668 because the voting algorithm decided not to power down PA
669 VOS_STATUS_SUCCESS - operation completed successfully if status is SYNC (will be set)
670 OR operation started successfully if status is ASYNC (will be set)
671
672*/
673VOS_STATUS vos_chipVoteFreqFor1p3VSupply
674(
675 vos_call_status_type* status,
676 vos_power_cb_type callback,
677 v_PVOID_t user_data,
678 v_U32_t freq
679)
680{
Jeff Johnson295189b2012-06-20 16:38:30 -0700681 return VOS_STATUS_SUCCESS;
682}