OSDN Git Service

Add rtl8821ce driver version 5.5.2
[android-x86/external-kernel-drivers.git] / rtl8821ce / hal / phydm / phydm_kfree.h
1
2 /******************************************************************************
3  *
4  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of version 2 of the GNU General Public License as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18  *
19  *
20  ******************************************************************************/
21
22 #ifndef __PHYDMKFREE_H__
23 #define    __PHYDKFREE_H__
24
25 #define KFREE_VERSION   "1.0"
26
27 #if (DM_ODM_SUPPORT_TYPE & ODM_WIN)
28
29 #define BB_GAIN_NUM             6
30 #define KFREE_FLAG_ON                           BIT(0)
31 #define KFREE_FLAG_THERMAL_K_ON         BIT(1)
32
33 #endif
34
35 #define PPG_BB_GAIN_2G_TXA_OFFSET_8821C         0x1EE
36 #define PPG_BB_GAIN_5GL1_TXA_OFFSET_8821C               0x1EC
37 #define PPG_BB_GAIN_5GL2_TXA_OFFSET_8821C               0x1E8
38 #define PPG_BB_GAIN_5GM1_TXA_OFFSET_8821C               0x1E4
39 #define PPG_BB_GAIN_5GM2_TXA_OFFSET_8821C               0x1E0
40 #define PPG_BB_GAIN_5GH1_TXA_OFFSET_8821C               0x1DC
41
42 #define PPG_THERMAL_OFFSET_8821C                0x1EF
43
44
45
46 struct odm_power_trim_data {
47         u8 flag;
48         s8 bb_gain[BB_GAIN_NUM][MAX_RF_PATH];
49         s8 thermal;
50 };
51
52
53
54 enum phydm_kfree_channeltosw {
55         PHYDM_2G = 0,
56         PHYDM_5GLB1 = 1,
57         PHYDM_5GLB2 = 2,
58         PHYDM_5GMB1 = 3,
59         PHYDM_5GMB2 = 4,
60         PHYDM_5GHB = 5,
61 };
62
63
64
65 void
66 phydm_get_thermal_trim_offset(
67         void    *p_dm_void
68 );
69
70 void
71 phydm_get_power_trim_offset(
72         void    *p_dm_void
73 );
74
75 s8
76 phydm_get_thermal_offset(
77         void    *p_dm_void
78 );
79
80 void
81 phydm_config_kfree(
82         void    *p_dm_void,
83         u8      channel_to_sw
84 );
85
86
87 #endif