xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8821cs/hal/phydm/phydm_pow_train.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2017  Realtek Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  *
14  * The full GNU General Public License is included in this distribution in the
15  * file called LICENSE.
16  *
17  * Contact Information:
18  * wlanfae <wlanfae@realtek.com>
19  * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20  * Hsinchu 300, Taiwan.
21  *
22  * Larry Finger <Larry.Finger@lwfinger.net>
23  *
24  *****************************************************************************/
25 
26 #ifndef __PHYDM_POW_TRAIN_H__
27 #define __PHYDM_POW_TRAIN_H__
28 
29 #define POW_TRAIN_VERSION "1.0" /* @2017.07.0141  Dino, Add phydm_pow_train.h*/
30 
31 /****************************************************************
32  * 1 ============================================================
33  * 1  Definition
34  * 1 ============================================================
35  ***************************************************************/
36 
37 #ifdef PHYDM_POWER_TRAINING_SUPPORT
38 /****************************************************************
39  * 1 ============================================================
40  * 1  structure
41  * 1 ============================================================
42  ***************************************************************/
43 
44 struct phydm_pow_train_stuc {
45 	u8 pt_state;
46 	u32 pow_train_score;
47 };
48 
49 /****************************************************************
50  * 1 ============================================================
51  * 1  enumeration
52  * 1 ============================================================
53  ***************************************************************/
54 
55 enum pow_train_state {
56 	DYNAMIC_POW_TRAIN = 0,
57 	ENABLE_POW_TRAIN = 1,
58 	DISABLE_POW_TRAIN = 2
59 };
60 
61 enum power_training_score {
62 	DISABLE_PT_SCORE = 0,
63 	KEEP_PRE_PT_SCORE = 1,
64 	ENABLE_PT_SCORE = 2
65 };
66 
67 /****************************************************************
68  * 1 ============================================================
69  * 1  function prototype
70  * 1 ============================================================
71  ***************************************************************/
72 
73 void phydm_update_power_training_state(
74 	void *dm_void);
75 
76 void phydm_pow_train_debug(
77 	void *dm_void,
78 	char input[][16],
79 	u32 *_used,
80 	char *output,
81 	u32 *_out_len);
82 
83 #endif
84 #endif
85