blob: 62a65efdf8d6133817beb5b8dbbaf0f2e47d12e2 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * descriptions + helper functions for simple dvb plls.
3 *
4 * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
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
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090021#include <linux/slab.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070022#include <linux/module.h>
23#include <linux/dvb/frontend.h>
24#include <asm/types.h>
25
26#include "dvb-pll.h"
27
Michael Krufky05a46112007-09-07 18:19:57 -030028struct dvb_pll_priv {
29 /* pll number */
30 int nr;
31
32 /* i2c details */
33 int pll_i2c_address;
34 struct i2c_adapter *i2c;
35
36 /* the PLL descriptor */
37 struct dvb_pll_desc *pll_desc;
38
39 /* cached frequency/bandwidth */
40 u32 frequency;
41 u32 bandwidth;
42};
43
Michael Krufkyff3e7dd2007-09-09 13:00:45 -030044#define DVB_PLL_MAX 64
Michael Krufky05a46112007-09-07 18:19:57 -030045
46static unsigned int dvb_pll_devcount;
47
Douglas Schilling Landgrafff699e62008-04-22 14:41:48 -030048static int debug;
Michael Krufky05a46112007-09-07 18:19:57 -030049module_param(debug, int, 0644);
50MODULE_PARM_DESC(debug, "enable verbose debug messages");
51
Michael Krufky704e39b2007-09-07 18:27:43 -030052static unsigned int id[DVB_PLL_MAX] =
53 { [ 0 ... (DVB_PLL_MAX-1) ] = DVB_PLL_UNDEFINED };
54module_param_array(id, int, NULL, 0644);
55MODULE_PARM_DESC(id, "force pll id to use (DEBUG ONLY)");
56
Michael Krufky05a46112007-09-07 18:19:57 -030057/* ----------------------------------------------------------- */
58
Michael Krufky47a99912007-06-12 16:10:51 -030059struct dvb_pll_desc {
60 char *name;
61 u32 min;
62 u32 max;
63 u32 iffreq;
Michael Krufky5d7802b2007-09-07 18:03:58 -030064 void (*set)(struct dvb_frontend *fe, u8 *buf,
65 const struct dvb_frontend_parameters *params);
Michael Krufky47a99912007-06-12 16:10:51 -030066 u8 *initdata;
Malcolm Priestley2b743342011-02-06 12:29:51 -030067 u8 *initdata2;
Michael Krufky47a99912007-06-12 16:10:51 -030068 u8 *sleepdata;
69 int count;
70 struct {
71 u32 limit;
72 u32 stepsize;
73 u8 config;
74 u8 cb;
75 } entries[12];
76};
77
Linus Torvalds1da177e2005-04-16 15:20:36 -070078/* ----------------------------------------------------------- */
79/* descriptions */
80
Michael Krufky47a99912007-06-12 16:10:51 -030081static struct dvb_pll_desc dvb_pll_thomson_dtt7579 = {
Linus Torvalds1da177e2005-04-16 15:20:36 -070082 .name = "Thomson dtt7579",
83 .min = 177000000,
84 .max = 858000000,
Trent Piephodf78cb02007-03-19 02:24:04 -030085 .iffreq= 36166667,
Trent Piephod519dcf2007-03-19 02:24:09 -030086 .sleepdata = (u8[]){ 2, 0xb4, 0x03 },
87 .count = 4,
Linus Torvalds1da177e2005-04-16 15:20:36 -070088 .entries = {
Trent Piephodf78cb02007-03-19 02:24:04 -030089 { 443250000, 166667, 0xb4, 0x02 },
90 { 542000000, 166667, 0xb4, 0x08 },
91 { 771000000, 166667, 0xbc, 0x08 },
92 { 999999999, 166667, 0xf4, 0x08 },
Linus Torvalds1da177e2005-04-16 15:20:36 -070093 },
94};
Linus Torvalds1da177e2005-04-16 15:20:36 -070095
Michael Krufky5d7802b2007-09-07 18:03:58 -030096static void thomson_dtt759x_bw(struct dvb_frontend *fe, u8 *buf,
Michael Krufky77d67502007-05-05 12:05:39 -030097 const struct dvb_frontend_parameters *params)
Linus Torvalds1da177e2005-04-16 15:20:36 -070098{
Michael Krufky77d67502007-05-05 12:05:39 -030099 if (BANDWIDTH_7_MHZ == params->u.ofdm.bandwidth)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100 buf[3] |= 0x10;
101}
102
Michael Krufky47a99912007-06-12 16:10:51 -0300103static struct dvb_pll_desc dvb_pll_thomson_dtt759x = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104 .name = "Thomson dtt759x",
105 .min = 177000000,
106 .max = 896000000,
Michael Krufky77d67502007-05-05 12:05:39 -0300107 .set = thomson_dtt759x_bw,
Trent Piephodf78cb02007-03-19 02:24:04 -0300108 .iffreq= 36166667,
Trent Piephod519dcf2007-03-19 02:24:09 -0300109 .sleepdata = (u8[]){ 2, 0x84, 0x03 },
110 .count = 5,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700111 .entries = {
Trent Piephodf78cb02007-03-19 02:24:04 -0300112 { 264000000, 166667, 0xb4, 0x02 },
113 { 470000000, 166667, 0xbc, 0x02 },
114 { 735000000, 166667, 0xbc, 0x08 },
115 { 835000000, 166667, 0xf4, 0x08 },
116 { 999999999, 166667, 0xfc, 0x08 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700117 },
118};
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119
Michael Krufky47a99912007-06-12 16:10:51 -0300120static struct dvb_pll_desc dvb_pll_lg_z201 = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700121 .name = "LG z201",
122 .min = 174000000,
123 .max = 862000000,
Trent Piephodf78cb02007-03-19 02:24:04 -0300124 .iffreq= 36166667,
Trent Piephod519dcf2007-03-19 02:24:09 -0300125 .sleepdata = (u8[]){ 2, 0xbc, 0x03 },
126 .count = 5,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700127 .entries = {
Trent Piephodf78cb02007-03-19 02:24:04 -0300128 { 157500000, 166667, 0xbc, 0x01 },
129 { 443250000, 166667, 0xbc, 0x02 },
130 { 542000000, 166667, 0xbc, 0x04 },
131 { 830000000, 166667, 0xf4, 0x04 },
132 { 999999999, 166667, 0xfc, 0x04 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700133 },
134};
Linus Torvalds1da177e2005-04-16 15:20:36 -0700135
Michael Krufky47a99912007-06-12 16:10:51 -0300136static struct dvb_pll_desc dvb_pll_unknown_1 = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137 .name = "unknown 1", /* used by dntv live dvb-t */
138 .min = 174000000,
139 .max = 862000000,
Trent Piephodf78cb02007-03-19 02:24:04 -0300140 .iffreq= 36166667,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700141 .count = 9,
142 .entries = {
Trent Piephodf78cb02007-03-19 02:24:04 -0300143 { 150000000, 166667, 0xb4, 0x01 },
144 { 173000000, 166667, 0xbc, 0x01 },
145 { 250000000, 166667, 0xb4, 0x02 },
146 { 400000000, 166667, 0xbc, 0x02 },
147 { 420000000, 166667, 0xf4, 0x02 },
148 { 470000000, 166667, 0xfc, 0x02 },
149 { 600000000, 166667, 0xbc, 0x08 },
150 { 730000000, 166667, 0xf4, 0x08 },
151 { 999999999, 166667, 0xfc, 0x08 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700152 },
153};
Linus Torvalds1da177e2005-04-16 15:20:36 -0700154
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700155/* Infineon TUA6010XS
156 * used in Thomson Cable Tuner
157 */
Michael Krufky47a99912007-06-12 16:10:51 -0300158static struct dvb_pll_desc dvb_pll_tua6010xs = {
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700159 .name = "Infineon TUA6010XS",
160 .min = 44250000,
161 .max = 858000000,
Trent Piephodf78cb02007-03-19 02:24:04 -0300162 .iffreq= 36125000,
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700163 .count = 3,
164 .entries = {
Trent Piephodf78cb02007-03-19 02:24:04 -0300165 { 115750000, 62500, 0x8e, 0x03 },
166 { 403250000, 62500, 0x8e, 0x06 },
167 { 999999999, 62500, 0x8e, 0x85 },
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700168 },
169};
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700170
171/* Panasonic env57h1xd5 (some Philips PLL ?) */
Michael Krufky47a99912007-06-12 16:10:51 -0300172static struct dvb_pll_desc dvb_pll_env57h1xd5 = {
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700173 .name = "Panasonic ENV57H1XD5",
174 .min = 44250000,
175 .max = 858000000,
Trent Piephodf78cb02007-03-19 02:24:04 -0300176 .iffreq= 36125000,
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700177 .count = 4,
178 .entries = {
Trent Piephodf78cb02007-03-19 02:24:04 -0300179 { 153000000, 166667, 0xc2, 0x41 },
180 { 470000000, 166667, 0xc2, 0x42 },
181 { 526000000, 166667, 0xc2, 0x84 },
182 { 999999999, 166667, 0xc2, 0xa4 },
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700183 },
184};
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700185
186/* Philips TDA6650/TDA6651
187 * used in Panasonic ENV77H11D5
188 */
Michael Krufky5d7802b2007-09-07 18:03:58 -0300189static void tda665x_bw(struct dvb_frontend *fe, u8 *buf,
190 const struct dvb_frontend_parameters *params)
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700191{
Michael Krufky77d67502007-05-05 12:05:39 -0300192 if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ)
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700193 buf[3] |= 0x08;
194}
195
Michael Krufky47a99912007-06-12 16:10:51 -0300196static struct dvb_pll_desc dvb_pll_tda665x = {
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700197 .name = "Philips TDA6650/TDA6651",
198 .min = 44250000,
199 .max = 858000000,
Michael Krufky77d67502007-05-05 12:05:39 -0300200 .set = tda665x_bw,
Trent Piephodf78cb02007-03-19 02:24:04 -0300201 .iffreq= 36166667,
Michael Krufkyfbfee862007-05-09 15:58:17 -0300202 .initdata = (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab },
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700203 .count = 12,
204 .entries = {
Trent Piephodf78cb02007-03-19 02:24:04 -0300205 { 93834000, 166667, 0xca, 0x61 /* 011 0 0 0 01 */ },
206 { 123834000, 166667, 0xca, 0xa1 /* 101 0 0 0 01 */ },
207 { 161000000, 166667, 0xca, 0xa1 /* 101 0 0 0 01 */ },
208 { 163834000, 166667, 0xca, 0xc2 /* 110 0 0 0 10 */ },
209 { 253834000, 166667, 0xca, 0x62 /* 011 0 0 0 10 */ },
210 { 383834000, 166667, 0xca, 0xa2 /* 101 0 0 0 10 */ },
211 { 443834000, 166667, 0xca, 0xc2 /* 110 0 0 0 10 */ },
212 { 444000000, 166667, 0xca, 0xc4 /* 110 0 0 1 00 */ },
213 { 583834000, 166667, 0xca, 0x64 /* 011 0 0 1 00 */ },
214 { 793834000, 166667, 0xca, 0xa4 /* 101 0 0 1 00 */ },
215 { 444834000, 166667, 0xca, 0xc4 /* 110 0 0 1 00 */ },
216 { 861000000, 166667, 0xca, 0xe4 /* 111 0 0 1 00 */ },
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700217 }
218};
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700219
220/* Infineon TUA6034
221 * used in LG TDTP E102P
222 */
Michael Krufky5d7802b2007-09-07 18:03:58 -0300223static void tua6034_bw(struct dvb_frontend *fe, u8 *buf,
224 const struct dvb_frontend_parameters *params)
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700225{
Michael Krufky77d67502007-05-05 12:05:39 -0300226 if (BANDWIDTH_7_MHZ != params->u.ofdm.bandwidth)
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700227 buf[3] |= 0x08;
228}
229
Michael Krufky47a99912007-06-12 16:10:51 -0300230static struct dvb_pll_desc dvb_pll_tua6034 = {
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700231 .name = "Infineon TUA6034",
232 .min = 44250000,
233 .max = 858000000,
Trent Piephodf78cb02007-03-19 02:24:04 -0300234 .iffreq= 36166667,
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700235 .count = 3,
Michael Krufky77d67502007-05-05 12:05:39 -0300236 .set = tua6034_bw,
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700237 .entries = {
Trent Piephodf78cb02007-03-19 02:24:04 -0300238 { 174500000, 62500, 0xce, 0x01 },
239 { 230000000, 62500, 0xce, 0x02 },
240 { 999999999, 62500, 0xce, 0x04 },
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700241 },
242};
Johannes Stezenbach776338e2005-06-23 22:02:35 -0700243
Patrick Boettcher0589b8e2005-07-07 17:58:12 -0700244/* ALPS TDED4
245 * used in Nebula-Cards and USB boxes
246 */
Michael Krufky5d7802b2007-09-07 18:03:58 -0300247static void tded4_bw(struct dvb_frontend *fe, u8 *buf,
248 const struct dvb_frontend_parameters *params)
Patrick Boettcher0589b8e2005-07-07 17:58:12 -0700249{
Michael Krufky77d67502007-05-05 12:05:39 -0300250 if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ)
Patrick Boettcher0589b8e2005-07-07 17:58:12 -0700251 buf[3] |= 0x04;
252}
253
Michael Krufky47a99912007-06-12 16:10:51 -0300254static struct dvb_pll_desc dvb_pll_tded4 = {
Patrick Boettcher0589b8e2005-07-07 17:58:12 -0700255 .name = "ALPS TDED4",
256 .min = 47000000,
257 .max = 863000000,
Trent Piephodf78cb02007-03-19 02:24:04 -0300258 .iffreq= 36166667,
Michael Krufky77d67502007-05-05 12:05:39 -0300259 .set = tded4_bw,
Patrick Boettcher0589b8e2005-07-07 17:58:12 -0700260 .count = 4,
261 .entries = {
Trent Piephodf78cb02007-03-19 02:24:04 -0300262 { 153000000, 166667, 0x85, 0x01 },
263 { 470000000, 166667, 0x85, 0x02 },
264 { 823000000, 166667, 0x85, 0x08 },
265 { 999999999, 166667, 0x85, 0x88 },
Patrick Boettcher0589b8e2005-07-07 17:58:12 -0700266 }
267};
Patrick Boettcher0589b8e2005-07-07 17:58:12 -0700268
Kirk Lapray147418c2005-11-08 21:35:39 -0800269/* ALPS TDHU2
270 * used in AverTVHD MCE A180
271 */
Michael Krufky47a99912007-06-12 16:10:51 -0300272static struct dvb_pll_desc dvb_pll_tdhu2 = {
Kirk Lapray147418c2005-11-08 21:35:39 -0800273 .name = "ALPS TDHU2",
274 .min = 54000000,
275 .max = 864000000,
Trent Piephodf78cb02007-03-19 02:24:04 -0300276 .iffreq= 44000000,
Kirk Lapray147418c2005-11-08 21:35:39 -0800277 .count = 4,
278 .entries = {
Trent Piephodf78cb02007-03-19 02:24:04 -0300279 { 162000000, 62500, 0x85, 0x01 },
280 { 426000000, 62500, 0x85, 0x02 },
281 { 782000000, 62500, 0x85, 0x08 },
282 { 999999999, 62500, 0x85, 0x88 },
Kirk Lapray147418c2005-11-08 21:35:39 -0800283 }
284};
Kirk Lapray147418c2005-11-08 21:35:39 -0800285
Michael Krufkyd76a6172006-01-23 17:11:06 -0200286/* Samsung TBMV30111IN / TBMV30712IN1
Kirk Lapray147418c2005-11-08 21:35:39 -0800287 * used in Air2PC ATSC - 2nd generation (nxt2002)
288 */
Michael Krufky47a99912007-06-12 16:10:51 -0300289static struct dvb_pll_desc dvb_pll_samsung_tbmv = {
Michael Krufky28f3d4b2006-01-23 17:11:07 -0200290 .name = "Samsung TBMV30111IN / TBMV30712IN1",
Kirk Lapray147418c2005-11-08 21:35:39 -0800291 .min = 54000000,
292 .max = 860000000,
Trent Piephodf78cb02007-03-19 02:24:04 -0300293 .iffreq= 44000000,
Michael Krufky17c37ef2006-01-15 19:04:04 -0200294 .count = 6,
Kirk Lapray147418c2005-11-08 21:35:39 -0800295 .entries = {
Trent Piephodf78cb02007-03-19 02:24:04 -0300296 { 172000000, 166667, 0xb4, 0x01 },
297 { 214000000, 166667, 0xb4, 0x02 },
298 { 467000000, 166667, 0xbc, 0x02 },
299 { 721000000, 166667, 0xbc, 0x08 },
300 { 841000000, 166667, 0xf4, 0x08 },
301 { 999999999, 166667, 0xfc, 0x02 },
Kirk Lapray147418c2005-11-08 21:35:39 -0800302 }
303};
Kirk Lapray147418c2005-11-08 21:35:39 -0800304
Regis Prevotf8bf1342006-01-11 23:31:53 -0200305/*
306 * Philips SD1878 Tuner.
307 */
Michael Krufky47a99912007-06-12 16:10:51 -0300308static struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = {
Regis Prevotf8bf1342006-01-11 23:31:53 -0200309 .name = "Philips SD1878",
310 .min = 950000,
311 .max = 2150000,
Trent Piephodf78cb02007-03-19 02:24:04 -0300312 .iffreq= 249, /* zero-IF, offset 249 is to round up */
Regis Prevotf8bf1342006-01-11 23:31:53 -0200313 .count = 4,
314 .entries = {
Trent Piephodf78cb02007-03-19 02:24:04 -0300315 { 1250000, 500, 0xc4, 0x00},
Manu Abrahamb3332a92007-07-03 09:58:57 -0300316 { 1450000, 500, 0xc4, 0x40},
Trent Piephodf78cb02007-03-19 02:24:04 -0300317 { 2050000, 500, 0xc4, 0x80},
318 { 2150000, 500, 0xc4, 0xc0},
Regis Prevotf8bf1342006-01-11 23:31:53 -0200319 },
320};
Regis Prevotf8bf1342006-01-11 23:31:53 -0200321
Michael Krufky5d7802b2007-09-07 18:03:58 -0300322static void opera1_bw(struct dvb_frontend *fe, u8 *buf,
323 const struct dvb_frontend_parameters *params)
Marco Gittler941491f2007-04-19 11:26:47 -0300324{
Malcolm Priestley2b743342011-02-06 12:29:51 -0300325 struct dvb_pll_priv *priv = fe->tuner_priv;
326 u32 b_w = (params->u.qpsk.symbol_rate * 27) / 32000;
327 struct i2c_msg msg = {
328 .addr = priv->pll_i2c_address,
329 .flags = 0,
330 .buf = buf,
331 .len = 4
332 };
333 int result;
334 u8 lpf;
335
336 if (fe->ops.i2c_gate_ctrl)
337 fe->ops.i2c_gate_ctrl(fe, 1);
338
339 result = i2c_transfer(priv->i2c, &msg, 1);
340 if (result != 1)
341 printk(KERN_ERR "%s: i2c_transfer failed:%d",
342 __func__, result);
343
344 if (b_w <= 10000)
345 lpf = 0xc;
346 else if (b_w <= 12000)
347 lpf = 0x2;
348 else if (b_w <= 14000)
349 lpf = 0xa;
350 else if (b_w <= 16000)
351 lpf = 0x6;
352 else if (b_w <= 18000)
353 lpf = 0xe;
354 else if (b_w <= 20000)
355 lpf = 0x1;
356 else if (b_w <= 22000)
357 lpf = 0x9;
358 else if (b_w <= 24000)
359 lpf = 0x5;
360 else if (b_w <= 26000)
361 lpf = 0xd;
362 else if (b_w <= 28000)
363 lpf = 0x3;
364 else
365 lpf = 0xb;
366 buf[2] ^= 0x1c; /* Flip bits 3-5 */
367 /* Set lpf */
368 buf[2] |= ((lpf >> 2) & 0x3) << 3;
369 buf[3] |= (lpf & 0x3) << 2;
370
371 return;
Marco Gittler941491f2007-04-19 11:26:47 -0300372}
373
Michael Krufky47a99912007-06-12 16:10:51 -0300374static struct dvb_pll_desc dvb_pll_opera1 = {
Marco Gittler941491f2007-04-19 11:26:47 -0300375 .name = "Opera Tuner",
376 .min = 900000,
377 .max = 2250000,
Malcolm Priestley2b743342011-02-06 12:29:51 -0300378 .initdata = (u8[]){ 4, 0x08, 0xe5, 0xe1, 0x00 },
379 .initdata2 = (u8[]){ 4, 0x08, 0xe5, 0xe5, 0x00 },
Marco Gittler941491f2007-04-19 11:26:47 -0300380 .iffreq= 0,
Michael Krufky77d67502007-05-05 12:05:39 -0300381 .set = opera1_bw,
Marco Gittler941491f2007-04-19 11:26:47 -0300382 .count = 8,
383 .entries = {
Malcolm Priestley2b743342011-02-06 12:29:51 -0300384 { 1064000, 500, 0xf9, 0xc2 },
385 { 1169000, 500, 0xf9, 0xe2 },
386 { 1299000, 500, 0xf9, 0x20 },
387 { 1444000, 500, 0xf9, 0x40 },
388 { 1606000, 500, 0xf9, 0x60 },
389 { 1777000, 500, 0xf9, 0x80 },
390 { 1941000, 500, 0xf9, 0xa0 },
391 { 2250000, 500, 0xf9, 0xc0 },
Marco Gittler941491f2007-04-19 11:26:47 -0300392 }
393};
Michael Krufky47a99912007-06-12 16:10:51 -0300394
Antti Palosaari139dfeb2008-05-17 23:02:00 -0300395static void samsung_dtos403ih102a_set(struct dvb_frontend *fe, u8 *buf,
396 const struct dvb_frontend_parameters *params)
397{
398 struct dvb_pll_priv *priv = fe->tuner_priv;
399 struct i2c_msg msg = {
400 .addr = priv->pll_i2c_address,
401 .flags = 0,
402 .buf = buf,
403 .len = 4
404 };
405 int result;
406
407 if (fe->ops.i2c_gate_ctrl)
408 fe->ops.i2c_gate_ctrl(fe, 1);
409
410 result = i2c_transfer(priv->i2c, &msg, 1);
411 if (result != 1)
412 printk(KERN_ERR "%s: i2c_transfer failed:%d",
413 __func__, result);
414
415 buf[2] = 0x9e;
416 buf[3] = 0x90;
417
418 return;
419}
420
421/* unknown pll used in Samsung DTOS403IH102A DVB-C tuner */
422static struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = {
423 .name = "Samsung DTOS403IH102A",
424 .min = 44250000,
425 .max = 858000000,
426 .iffreq = 36125000,
427 .count = 8,
428 .set = samsung_dtos403ih102a_set,
429 .entries = {
430 { 135000000, 62500, 0xbe, 0x01 },
431 { 177000000, 62500, 0xf6, 0x01 },
432 { 370000000, 62500, 0xbe, 0x02 },
433 { 450000000, 62500, 0xf6, 0x02 },
434 { 466000000, 62500, 0xfe, 0x02 },
435 { 538000000, 62500, 0xbe, 0x08 },
436 { 826000000, 62500, 0xf6, 0x08 },
437 { 999999999, 62500, 0xfe, 0x08 },
438 }
439};
440
Trent Piephoa104ed02009-06-11 19:21:34 -0300441/* Samsung TDTC9251DH0 DVB-T NIM, as used on AirStar 2 */
442static struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 = {
443 .name = "Samsung TDTC9251DH0",
444 .min = 48000000,
445 .max = 863000000,
446 .iffreq = 36166667,
447 .count = 3,
448 .entries = {
449 { 157500000, 166667, 0xcc, 0x09 },
450 { 443000000, 166667, 0xcc, 0x0a },
451 { 863000000, 166667, 0xcc, 0x08 },
452 }
453};
454
Trent Piephof52c4852009-06-11 19:21:34 -0300455/* Samsung TBDU18132 DVB-S NIM with TSA5059 PLL, used in SkyStar2 DVB-S 2.3 */
456static struct dvb_pll_desc dvb_pll_samsung_tbdu18132 = {
457 .name = "Samsung TBDU18132",
458 .min = 950000,
459 .max = 2150000, /* guesses */
460 .iffreq = 0,
461 .count = 2,
462 .entries = {
463 { 1550000, 125, 0x84, 0x82 },
464 { 4095937, 125, 0x84, 0x80 },
465 }
466 /* TSA5059 PLL has a 17 bit divisor rather than the 15 bits supported
467 * by this driver. The two extra bits are 0x60 in the third byte. 15
468 * bits is enough for over 4 GHz, which is enough to cover the range
469 * of this tuner. We could use the additional divisor bits by adding
470 * more entries, e.g.
471 { 0x0ffff * 125 + 125/2, 125, 0x84 | 0x20, },
472 { 0x17fff * 125 + 125/2, 125, 0x84 | 0x40, },
473 { 0x1ffff * 125 + 125/2, 125, 0x84 | 0x60, }, */
474};
475
Trent Piepho9d5d75a2009-06-11 19:21:34 -0300476/* Samsung TBMU24112 DVB-S NIM with SL1935 zero-IF tuner */
477static struct dvb_pll_desc dvb_pll_samsung_tbmu24112 = {
478 .name = "Samsung TBMU24112",
479 .min = 950000,
480 .max = 2150000, /* guesses */
481 .iffreq = 0,
482 .count = 2,
483 .entries = {
484 { 1500000, 125, 0x84, 0x18 },
485 { 9999999, 125, 0x84, 0x08 },
486 }
487};
488
Trent Piephod799ce52009-06-11 19:24:00 -0300489/* Alps TDEE4 DVB-C NIM, used on Cablestar 2 */
490/* byte 4 : 1 * * AGD R3 R2 R1 R0
491 * byte 5 : C1 * RE RTS BS4 BS3 BS2 BS1
492 * AGD = 1, R3 R2 R1 R0 = 0 1 0 1 => byte 4 = 1**10101 = 0x95
493 * Range(MHz) C1 * RE RTS BS4 BS3 BS2 BS1 Byte 5
494 * 47 - 153 0 * 0 0 0 0 0 1 0x01
495 * 153 - 430 0 * 0 0 0 0 1 0 0x02
496 * 430 - 822 0 * 0 0 1 0 0 0 0x08
497 * 822 - 862 1 * 0 0 1 0 0 0 0x88 */
498static struct dvb_pll_desc dvb_pll_alps_tdee4 = {
499 .name = "ALPS TDEE4",
500 .min = 47000000,
501 .max = 862000000,
502 .iffreq = 36125000,
503 .count = 4,
504 .entries = {
505 { 153000000, 62500, 0x95, 0x01 },
506 { 430000000, 62500, 0x95, 0x02 },
507 { 822000000, 62500, 0x95, 0x08 },
508 { 999999999, 62500, 0x95, 0x88 },
509 }
510};
511
Michael Krufky47a99912007-06-12 16:10:51 -0300512/* ----------------------------------------------------------- */
513
514static struct dvb_pll_desc *pll_list[] = {
515 [DVB_PLL_UNDEFINED] = NULL,
516 [DVB_PLL_THOMSON_DTT7579] = &dvb_pll_thomson_dtt7579,
517 [DVB_PLL_THOMSON_DTT759X] = &dvb_pll_thomson_dtt759x,
Michael Krufky47a99912007-06-12 16:10:51 -0300518 [DVB_PLL_LG_Z201] = &dvb_pll_lg_z201,
Michael Krufky47a99912007-06-12 16:10:51 -0300519 [DVB_PLL_UNKNOWN_1] = &dvb_pll_unknown_1,
520 [DVB_PLL_TUA6010XS] = &dvb_pll_tua6010xs,
521 [DVB_PLL_ENV57H1XD5] = &dvb_pll_env57h1xd5,
522 [DVB_PLL_TUA6034] = &dvb_pll_tua6034,
Michael Krufky47a99912007-06-12 16:10:51 -0300523 [DVB_PLL_TDA665X] = &dvb_pll_tda665x,
Michael Krufky47a99912007-06-12 16:10:51 -0300524 [DVB_PLL_TDED4] = &dvb_pll_tded4,
Trent Piephod799ce52009-06-11 19:24:00 -0300525 [DVB_PLL_TDEE4] = &dvb_pll_alps_tdee4,
Michael Krufky47a99912007-06-12 16:10:51 -0300526 [DVB_PLL_TDHU2] = &dvb_pll_tdhu2,
527 [DVB_PLL_SAMSUNG_TBMV] = &dvb_pll_samsung_tbmv,
528 [DVB_PLL_PHILIPS_SD1878_TDA8261] = &dvb_pll_philips_sd1878_tda8261,
Michael Krufky47a99912007-06-12 16:10:51 -0300529 [DVB_PLL_OPERA1] = &dvb_pll_opera1,
Antti Palosaari139dfeb2008-05-17 23:02:00 -0300530 [DVB_PLL_SAMSUNG_DTOS403IH102A] = &dvb_pll_samsung_dtos403ih102a,
Trent Piephoa104ed02009-06-11 19:21:34 -0300531 [DVB_PLL_SAMSUNG_TDTC9251DH0] = &dvb_pll_samsung_tdtc9251dh0,
Trent Piephof52c4852009-06-11 19:21:34 -0300532 [DVB_PLL_SAMSUNG_TBDU18132] = &dvb_pll_samsung_tbdu18132,
Trent Piepho9d5d75a2009-06-11 19:21:34 -0300533 [DVB_PLL_SAMSUNG_TBMU24112] = &dvb_pll_samsung_tbmu24112,
Michael Krufky47a99912007-06-12 16:10:51 -0300534};
535
536/* ----------------------------------------------------------- */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700537/* code */
538
Michael Krufky5d7802b2007-09-07 18:03:58 -0300539static int dvb_pll_configure(struct dvb_frontend *fe, u8 *buf,
Trent Piepho4ce15672007-06-02 16:30:46 -0300540 const struct dvb_frontend_parameters *params)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700541{
Michael Krufky5d7802b2007-09-07 18:03:58 -0300542 struct dvb_pll_priv *priv = fe->tuner_priv;
543 struct dvb_pll_desc *desc = priv->pll_desc;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700544 u32 div;
545 int i;
546
Michael Krufky77d67502007-05-05 12:05:39 -0300547 if (params->frequency != 0 && (params->frequency < desc->min ||
548 params->frequency > desc->max))
549 return -EINVAL;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700550
551 for (i = 0; i < desc->count; i++) {
Michael Krufky77d67502007-05-05 12:05:39 -0300552 if (params->frequency > desc->entries[i].limit)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700553 continue;
554 break;
555 }
Michael Krufky77d67502007-05-05 12:05:39 -0300556
Linus Torvalds1da177e2005-04-16 15:20:36 -0700557 if (debug)
Michael Krufky77d67502007-05-05 12:05:39 -0300558 printk("pll: %s: freq=%d | i=%d/%d\n", desc->name,
559 params->frequency, i, desc->count);
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300560 if (i == desc->count)
561 return -EINVAL;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700562
Michael Krufky77d67502007-05-05 12:05:39 -0300563 div = (params->frequency + desc->iffreq +
564 desc->entries[i].stepsize/2) / desc->entries[i].stepsize;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700565 buf[0] = div >> 8;
566 buf[1] = div & 0xff;
Michael Krufkyab66b222006-01-23 17:11:11 -0200567 buf[2] = desc->entries[i].config;
568 buf[3] = desc->entries[i].cb;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700569
Michael Krufky77d67502007-05-05 12:05:39 -0300570 if (desc->set)
Michael Krufky5d7802b2007-09-07 18:03:58 -0300571 desc->set(fe, buf, params);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700572
573 if (debug)
574 printk("pll: %s: div=%d | buf=0x%02x,0x%02x,0x%02x,0x%02x\n",
575 desc->name, div, buf[0], buf[1], buf[2], buf[3]);
576
Michael Krufky89faeef2006-11-20 16:45:29 -0300577 // calculate the frequency we set it to
Trent Piephodf78cb02007-03-19 02:24:04 -0300578 return (div * desc->entries[i].stepsize) - desc->iffreq;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700579}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700580
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300581static int dvb_pll_release(struct dvb_frontend *fe)
582{
Michael Krufky22139182006-11-19 19:49:11 -0300583 kfree(fe->tuner_priv);
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300584 fe->tuner_priv = NULL;
585 return 0;
586}
587
588static int dvb_pll_sleep(struct dvb_frontend *fe)
589{
590 struct dvb_pll_priv *priv = fe->tuner_priv;
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300591
Chris Pascoec162dff2006-08-08 15:48:08 -0300592 if (priv->i2c == NULL)
593 return -EINVAL;
594
Trent Piephod519dcf2007-03-19 02:24:09 -0300595 if (priv->pll_desc->sleepdata) {
596 struct i2c_msg msg = { .flags = 0,
597 .addr = priv->pll_i2c_address,
598 .buf = priv->pll_desc->sleepdata + 1,
599 .len = priv->pll_desc->sleepdata[0] };
600
601 int result;
602
603 if (fe->ops.i2c_gate_ctrl)
604 fe->ops.i2c_gate_ctrl(fe, 1);
605 if ((result = i2c_transfer(priv->i2c, &msg, 1)) != 1) {
606 return result;
607 }
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300608 return 0;
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300609 }
Trent Piephod519dcf2007-03-19 02:24:09 -0300610 /* Shouldn't be called when initdata is NULL, maybe BUG()? */
611 return -EINVAL;
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300612}
613
Michael Krufky47ae9ae2006-11-20 16:38:42 -0300614static int dvb_pll_set_params(struct dvb_frontend *fe,
615 struct dvb_frontend_parameters *params)
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300616{
617 struct dvb_pll_priv *priv = fe->tuner_priv;
618 u8 buf[4];
619 struct i2c_msg msg =
Michael Krufky47ae9ae2006-11-20 16:38:42 -0300620 { .addr = priv->pll_i2c_address, .flags = 0,
621 .buf = buf, .len = sizeof(buf) };
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300622 int result;
Michael Krufky77d67502007-05-05 12:05:39 -0300623 u32 frequency = 0;
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300624
625 if (priv->i2c == NULL)
626 return -EINVAL;
627
Michael Krufky5d7802b2007-09-07 18:03:58 -0300628 if ((result = dvb_pll_configure(fe, buf, params)) < 0)
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300629 return result;
Michael Krufky89faeef2006-11-20 16:45:29 -0300630 else
631 frequency = result;
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300632
Patrick Boettcherdea74862006-05-14 05:01:31 -0300633 if (fe->ops.i2c_gate_ctrl)
634 fe->ops.i2c_gate_ctrl(fe, 1);
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300635 if ((result = i2c_transfer(priv->i2c, &msg, 1)) != 1) {
636 return result;
637 }
638
Michael Krufky89faeef2006-11-20 16:45:29 -0300639 priv->frequency = frequency;
Michael Krufky77d67502007-05-05 12:05:39 -0300640 priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? params->u.ofdm.bandwidth : 0;
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300641
642 return 0;
643}
644
Michael Krufky47ae9ae2006-11-20 16:38:42 -0300645static int dvb_pll_calc_regs(struct dvb_frontend *fe,
646 struct dvb_frontend_parameters *params,
647 u8 *buf, int buf_len)
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300648{
649 struct dvb_pll_priv *priv = fe->tuner_priv;
650 int result;
Michael Krufky77d67502007-05-05 12:05:39 -0300651 u32 frequency = 0;
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300652
653 if (buf_len < 5)
654 return -EINVAL;
655
Michael Krufky5d7802b2007-09-07 18:03:58 -0300656 if ((result = dvb_pll_configure(fe, buf+1, params)) < 0)
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300657 return result;
Michael Krufky89faeef2006-11-20 16:45:29 -0300658 else
659 frequency = result;
660
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300661 buf[0] = priv->pll_i2c_address;
662
Michael Krufky89faeef2006-11-20 16:45:29 -0300663 priv->frequency = frequency;
Michael Krufky77d67502007-05-05 12:05:39 -0300664 priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? params->u.ofdm.bandwidth : 0;
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300665
666 return 5;
667}
668
669static int dvb_pll_get_frequency(struct dvb_frontend *fe, u32 *frequency)
670{
671 struct dvb_pll_priv *priv = fe->tuner_priv;
672 *frequency = priv->frequency;
673 return 0;
674}
675
676static int dvb_pll_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
677{
678 struct dvb_pll_priv *priv = fe->tuner_priv;
679 *bandwidth = priv->bandwidth;
680 return 0;
681}
682
Trent Piepho26aed922007-04-27 12:31:29 -0300683static int dvb_pll_init(struct dvb_frontend *fe)
684{
685 struct dvb_pll_priv *priv = fe->tuner_priv;
686
687 if (priv->i2c == NULL)
688 return -EINVAL;
689
690 if (priv->pll_desc->initdata) {
691 struct i2c_msg msg = { .flags = 0,
692 .addr = priv->pll_i2c_address,
693 .buf = priv->pll_desc->initdata + 1,
694 .len = priv->pll_desc->initdata[0] };
695
696 int result;
697 if (fe->ops.i2c_gate_ctrl)
698 fe->ops.i2c_gate_ctrl(fe, 1);
Malcolm Priestley2b743342011-02-06 12:29:51 -0300699 result = i2c_transfer(priv->i2c, &msg, 1);
700 if (result != 1)
Trent Piepho26aed922007-04-27 12:31:29 -0300701 return result;
Malcolm Priestley2b743342011-02-06 12:29:51 -0300702 if (priv->pll_desc->initdata2) {
703 msg.buf = priv->pll_desc->initdata2 + 1;
704 msg.len = priv->pll_desc->initdata2[0];
705 if (fe->ops.i2c_gate_ctrl)
706 fe->ops.i2c_gate_ctrl(fe, 1);
707 result = i2c_transfer(priv->i2c, &msg, 1);
708 if (result != 1)
709 return result;
Trent Piepho26aed922007-04-27 12:31:29 -0300710 }
711 return 0;
712 }
713 /* Shouldn't be called when initdata is NULL, maybe BUG()? */
714 return -EINVAL;
715}
716
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300717static struct dvb_tuner_ops dvb_pll_tuner_ops = {
718 .release = dvb_pll_release,
719 .sleep = dvb_pll_sleep,
Trent Piephod519dcf2007-03-19 02:24:09 -0300720 .init = dvb_pll_init,
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300721 .set_params = dvb_pll_set_params,
Andrew de Quinceybd4956b2006-04-18 21:38:49 -0300722 .calc_regs = dvb_pll_calc_regs,
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300723 .get_frequency = dvb_pll_get_frequency,
724 .get_bandwidth = dvb_pll_get_bandwidth,
725};
726
Michael Krufky47ae9ae2006-11-20 16:38:42 -0300727struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
728 struct i2c_adapter *i2c,
Michael Krufky47a99912007-06-12 16:10:51 -0300729 unsigned int pll_desc_id)
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300730{
Andrew de Quincey061b6232006-07-10 03:34:14 -0300731 u8 b1 [] = { 0 };
Michael Krufky47ae9ae2006-11-20 16:38:42 -0300732 struct i2c_msg msg = { .addr = pll_addr, .flags = I2C_M_RD,
733 .buf = b1, .len = 1 };
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300734 struct dvb_pll_priv *priv = NULL;
Andrew de Quincey061b6232006-07-10 03:34:14 -0300735 int ret;
Michael Krufky47a99912007-06-12 16:10:51 -0300736 struct dvb_pll_desc *desc;
737
Michael Krufky704e39b2007-09-07 18:27:43 -0300738 if ((id[dvb_pll_devcount] > DVB_PLL_UNDEFINED) &&
739 (id[dvb_pll_devcount] < ARRAY_SIZE(pll_list)))
740 pll_desc_id = id[dvb_pll_devcount];
741
Michael Krufky47a99912007-06-12 16:10:51 -0300742 BUG_ON(pll_desc_id < 1 || pll_desc_id >= ARRAY_SIZE(pll_list));
743
744 desc = pll_list[pll_desc_id];
Andrew de Quincey061b6232006-07-10 03:34:14 -0300745
Andrew de Quincey55c05b62006-07-16 19:41:41 -0300746 if (i2c != NULL) {
747 if (fe->ops.i2c_gate_ctrl)
748 fe->ops.i2c_gate_ctrl(fe, 1);
Andrew de Quincey061b6232006-07-10 03:34:14 -0300749
Andrew de Quincey95faba22006-07-18 16:37:13 -0300750 ret = i2c_transfer (i2c, &msg, 1);
751 if (ret != 1)
Andrew de Quincey2bfe0312006-08-08 09:10:08 -0300752 return NULL;
Andrew de Quincey55c05b62006-07-16 19:41:41 -0300753 if (fe->ops.i2c_gate_ctrl)
754 fe->ops.i2c_gate_ctrl(fe, 0);
755 }
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300756
757 priv = kzalloc(sizeof(struct dvb_pll_priv), GFP_KERNEL);
758 if (priv == NULL)
Andrew de Quincey2bfe0312006-08-08 09:10:08 -0300759 return NULL;
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300760
761 priv->pll_i2c_address = pll_addr;
762 priv->i2c = i2c;
763 priv->pll_desc = desc;
Michael Krufkya27e5e72007-09-07 18:11:15 -0300764 priv->nr = dvb_pll_devcount++;
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300765
Michael Krufky47ae9ae2006-11-20 16:38:42 -0300766 memcpy(&fe->ops.tuner_ops, &dvb_pll_tuner_ops,
767 sizeof(struct dvb_tuner_ops));
768
Trent Piepho982dd1b2007-04-27 12:31:27 -0300769 strncpy(fe->ops.tuner_ops.info.name, desc->name,
770 sizeof(fe->ops.tuner_ops.info.name));
Patrick Boettcherdea74862006-05-14 05:01:31 -0300771 fe->ops.tuner_ops.info.frequency_min = desc->min;
Trent Piepho0d84a622007-08-17 18:36:44 -0300772 fe->ops.tuner_ops.info.frequency_max = desc->max;
Trent Piephod519dcf2007-03-19 02:24:09 -0300773 if (!desc->initdata)
774 fe->ops.tuner_ops.init = NULL;
775 if (!desc->sleepdata)
776 fe->ops.tuner_ops.sleep = NULL;
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300777
778 fe->tuner_priv = priv;
Michael Krufkya27e5e72007-09-07 18:11:15 -0300779
Michael Krufky8528fa42007-09-09 05:08:30 -0300780 if ((debug) || (id[priv->nr] == pll_desc_id)) {
Michael Krufkya27e5e72007-09-07 18:11:15 -0300781 printk("dvb-pll[%d]", priv->nr);
782 if (i2c != NULL)
783 printk(" %d-%04x", i2c_adapter_id(i2c), pll_addr);
Michael Krufky704e39b2007-09-07 18:27:43 -0300784 printk(": id# %d (%s) attached, %s\n", pll_desc_id, desc->name,
785 id[priv->nr] == pll_desc_id ?
786 "insmod option" : "autodetected");
Michael Krufky4562fbe2007-09-09 05:16:34 -0300787 }
Michael Krufkya27e5e72007-09-07 18:11:15 -0300788
Andrew de Quincey2bfe0312006-08-08 09:10:08 -0300789 return fe;
Andrew de Quincey272bc4d2006-04-18 17:47:12 -0300790}
791EXPORT_SYMBOL(dvb_pll_attach);
792
Linus Torvalds1da177e2005-04-16 15:20:36 -0700793MODULE_DESCRIPTION("dvb pll library");
794MODULE_AUTHOR("Gerd Knorr");
795MODULE_LICENSE("GPL");