Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fc2580_priv.h
Go to the documentation of this file.
1 /*
2  * FCI FC2580 silicon tuner driver
3  *
4  * Copyright (C) 2012 Antti Palosaari <[email protected]>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef FC2580_PRIV_H
22 #define FC2580_PRIV_H
23 
24 #include "fc2580.h"
25 
29 };
30 
31 static const struct fc2580_reg_val fc2580_init_reg_vals[] = {
32  {0x00, 0x00},
33  {0x12, 0x86},
34  {0x14, 0x5c},
35  {0x16, 0x3c},
36  {0x1f, 0xd2},
37  {0x09, 0xd7},
38  {0x0b, 0xd5},
39  {0x0c, 0x32},
40  {0x0e, 0x43},
41  {0x21, 0x0a},
42  {0x22, 0x82},
43  {0x45, 0x10},
44  {0x4c, 0x00},
45  {0x3f, 0x88},
46  {0x02, 0x0e},
47  {0x58, 0x14},
48 };
49 
50 struct fc2580_pll {
54 };
55 
56 static const struct fc2580_pll fc2580_pll_lut[] = {
57  /* VCO min VCO max */
58  { 400000000, 12, 0x80}, /* .......... 4800000000 */
59  {1000000000, 4, 0x00}, /* 1600000000 4000000000 */
60  {0xffffffff, 2, 0x40}, /* 2000000000 .......... */
61 };
62 
68 };
69 
70 static const struct fc2580_if_filter fc2580_if_filter_lut[] = {
71  { 6000000, 4400, 0x18, 0x00},
72  { 7000000, 3910, 0x18, 0x80},
73  { 8000000, 3300, 0x18, 0x80},
74  {0xffffffff, 3300, 0x18, 0x80},
75 };
76 
103 };
104 
105 /* XXX: 0xff is used for don't-care! */
106 static const struct fc2580_freq_regs fc2580_freq_regs_lut[] = {
107  { 400000000,
108  0xff, 0x77, 0x33, 0x40, 0xff, 0xff, 0xff, 0x09, 0xff, 0x8c,
109  0x50, 0x0f, 0x07, 0x00, 0x15, 0x03, 0x05, 0x10, 0x12, 0x08,
110  0x0a, 0x78, 0x32, 0x54},
111  { 538000000,
112  0xf0, 0x77, 0x53, 0x60, 0xff, 0xff, 0xff, 0x09, 0xff, 0x8c,
113  0x50, 0x13, 0x07, 0x06, 0x15, 0x06, 0x08, 0x10, 0x12, 0x0b,
114  0x0c, 0x78, 0x32, 0x14},
115  { 794000000,
116  0xf0, 0x77, 0x53, 0x60, 0xff, 0xff, 0xff, 0x09, 0xff, 0x8c,
117  0x50, 0x15, 0x03, 0x03, 0x15, 0x03, 0x05, 0x0c, 0x0e, 0x0b,
118  0x0c, 0x78, 0x32, 0x14},
119  {1000000000,
120  0xf0, 0x77, 0x53, 0x60, 0xff, 0xff, 0xff, 0x09, 0xff, 0x8c,
121  0x50, 0x15, 0x07, 0x06, 0x15, 0x07, 0x09, 0x10, 0x12, 0x0b,
122  0x0c, 0x78, 0x32, 0x14},
123  {0xffffffff,
124  0xff, 0xff, 0xff, 0xff, 0x70, 0x37, 0xe7, 0x09, 0x20, 0x8c,
125  0x50, 0x0f, 0x0f, 0x00, 0x13, 0x00, 0x02, 0x0c, 0x0e, 0x08,
126  0x0a, 0xa0, 0x50, 0x14},
127 };
128 
129 struct fc2580_priv {
130  const struct fc2580_config *cfg;
131  struct i2c_adapter *i2c;
132 };
133 
134 #endif