2 * FCI FC2580 silicon tuner driver
4 * Copyright (C) 2012 Antti Palosaari <crope@iki.fi>
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.
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.
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.
25 #include <linux/math64.h>
27 struct fc2580_reg_val
{
32 static const struct fc2580_reg_val fc2580_init_reg_vals
[] = {
57 static const struct fc2580_pll fc2580_pll_lut
[] = {
59 { 400000000, 12, 0x80}, /* .......... 4800000000 */
60 {1000000000, 4, 0x00}, /* 1600000000 4000000000 */
61 {0xffffffff, 2, 0x40}, /* 2000000000 .......... */
64 struct fc2580_if_filter
{
71 static const struct fc2580_if_filter fc2580_if_filter_lut
[] = {
72 { 6000000, 4400, 0x18, 0x00},
73 { 7000000, 3910, 0x18, 0x80},
74 { 8000000, 3300, 0x18, 0x80},
75 {0xffffffff, 3300, 0x18, 0x80},
78 struct fc2580_freq_regs
{
106 /* XXX: 0xff is used for don't-care! */
107 static const struct fc2580_freq_regs fc2580_freq_regs_lut
[] = {
109 0xff, 0x77, 0x33, 0x40, 0xff, 0xff, 0xff, 0x09, 0xff, 0x8c,
110 0x50, 0x0f, 0x07, 0x00, 0x15, 0x03, 0x05, 0x10, 0x12, 0x08,
111 0x0a, 0x78, 0x32, 0x54},
113 0xf0, 0x77, 0x53, 0x60, 0xff, 0xff, 0xff, 0x09, 0xff, 0x8c,
114 0x50, 0x13, 0x07, 0x06, 0x15, 0x06, 0x08, 0x10, 0x12, 0x0b,
115 0x0c, 0x78, 0x32, 0x14},
117 0xf0, 0x77, 0x53, 0x60, 0xff, 0xff, 0xff, 0x09, 0xff, 0x8c,
118 0x50, 0x15, 0x03, 0x03, 0x15, 0x03, 0x05, 0x0c, 0x0e, 0x0b,
119 0x0c, 0x78, 0x32, 0x14},
121 0xf0, 0x77, 0x53, 0x60, 0xff, 0xff, 0xff, 0x09, 0xff, 0x8c,
122 0x50, 0x15, 0x07, 0x06, 0x15, 0x07, 0x09, 0x10, 0x12, 0x0b,
123 0x0c, 0x78, 0x32, 0x14},
125 0xff, 0xff, 0xff, 0xff, 0x70, 0x37, 0xe7, 0x09, 0x20, 0x8c,
126 0x50, 0x0f, 0x0f, 0x00, 0x13, 0x00, 0x02, 0x0c, 0x0e, 0x08,
127 0x0a, 0xa0, 0x50, 0x14},
131 const struct fc2580_config
*cfg
;
132 struct i2c_adapter
*i2c
;