tda10023.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  1. /*
  2. TDA10023 - DVB-C decoder
  3. (as used in Philips CU1216-3 NIM and the Reelbox DVB-C tuner card)
  4. Copyright (C) 2005 Georg Acher, BayCom GmbH (acher at baycom dot de)
  5. Copyright (c) 2006 Hartmut Birr (e9hack at gmail dot com)
  6. Remotely based on tda10021.c
  7. Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de>
  8. Copyright (C) 2004 Markus Schulz <msc@antzsystem.de>
  9. Support for TDA10021
  10. This program is free software; you can redistribute it and/or modify
  11. it under the terms of the GNU General Public License as published by
  12. the Free Software Foundation; either version 2 of the License, or
  13. (at your option) any later version.
  14. This program is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. GNU General Public License for more details.
  18. You should have received a copy of the GNU General Public License
  19. along with this program; if not, write to the Free Software
  20. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. */
  22. #include <linux/delay.h>
  23. #include <linux/errno.h>
  24. #include <linux/init.h>
  25. #include <linux/kernel.h>
  26. #include <linux/module.h>
  27. #include <linux/string.h>
  28. #include <linux/slab.h>
  29. #include <asm/div64.h>
  30. #include "dvb_frontend.h"
  31. #include "tda1002x.h"
  32. #define REG0_INIT_VAL 0x23
  33. struct tda10023_state {
  34. struct i2c_adapter* i2c;
  35. /* configuration settings */
  36. const struct tda10023_config *config;
  37. struct dvb_frontend frontend;
  38. u8 pwm;
  39. u8 reg0;
  40. /* clock settings */
  41. u32 xtal;
  42. u8 pll_m;
  43. u8 pll_p;
  44. u8 pll_n;
  45. u32 sysclk;
  46. };
  47. #define dprintk(x...)
  48. static int verbose;
  49. static u8 tda10023_readreg (struct tda10023_state* state, u8 reg)
  50. {
  51. u8 b0 [] = { reg };
  52. u8 b1 [] = { 0 };
  53. struct i2c_msg msg [] = { { .addr = state->config->demod_address, .flags = 0, .buf = b0, .len = 1 },
  54. { .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = b1, .len = 1 } };
  55. int ret;
  56. ret = i2c_transfer (state->i2c, msg, 2);
  57. if (ret != 2) {
  58. int num = state->frontend.dvb ? state->frontend.dvb->num : -1;
  59. printk(KERN_ERR "DVB: TDA10023(%d): %s: readreg error "
  60. "(reg == 0x%02x, ret == %i)\n",
  61. num, __func__, reg, ret);
  62. }
  63. return b1[0];
  64. }
  65. static int tda10023_writereg (struct tda10023_state* state, u8 reg, u8 data)
  66. {
  67. u8 buf[] = { reg, data };
  68. struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 };
  69. int ret;
  70. ret = i2c_transfer (state->i2c, &msg, 1);
  71. if (ret != 1) {
  72. int num = state->frontend.dvb ? state->frontend.dvb->num : -1;
  73. printk(KERN_ERR "DVB: TDA10023(%d): %s, writereg error "
  74. "(reg == 0x%02x, val == 0x%02x, ret == %i)\n",
  75. num, __func__, reg, data, ret);
  76. }
  77. return (ret != 1) ? -EREMOTEIO : 0;
  78. }
  79. static int tda10023_writebit (struct tda10023_state* state, u8 reg, u8 mask,u8 data)
  80. {
  81. if (mask==0xff)
  82. return tda10023_writereg(state, reg, data);
  83. else {
  84. u8 val;
  85. val=tda10023_readreg(state,reg);
  86. val&=~mask;
  87. val|=(data&mask);
  88. return tda10023_writereg(state, reg, val);
  89. }
  90. }
  91. static void tda10023_writetab(struct tda10023_state* state, u8* tab)
  92. {
  93. u8 r,m,v;
  94. while (1) {
  95. r=*tab++;
  96. m=*tab++;
  97. v=*tab++;
  98. if (r==0xff) {
  99. if (m==0xff)
  100. break;
  101. else
  102. msleep(m);
  103. }
  104. else
  105. tda10023_writebit(state,r,m,v);
  106. }
  107. }
  108. //get access to tuner
  109. static int lock_tuner(struct tda10023_state* state)
  110. {
  111. u8 buf[2] = { 0x0f, 0xc0 };
  112. struct i2c_msg msg = {.addr=state->config->demod_address, .flags=0, .buf=buf, .len=2};
  113. if(i2c_transfer(state->i2c, &msg, 1) != 1)
  114. {
  115. printk("tda10023: lock tuner fails\n");
  116. return -EREMOTEIO;
  117. }
  118. return 0;
  119. }
  120. //release access from tuner
  121. static int unlock_tuner(struct tda10023_state* state)
  122. {
  123. u8 buf[2] = { 0x0f, 0x40 };
  124. struct i2c_msg msg_post={.addr=state->config->demod_address, .flags=0, .buf=buf, .len=2};
  125. if(i2c_transfer(state->i2c, &msg_post, 1) != 1)
  126. {
  127. printk("tda10023: unlock tuner fails\n");
  128. return -EREMOTEIO;
  129. }
  130. return 0;
  131. }
  132. static int tda10023_setup_reg0 (struct tda10023_state* state, u8 reg0)
  133. {
  134. reg0 |= state->reg0 & 0x63;
  135. tda10023_writereg (state, 0x00, reg0 & 0xfe);
  136. tda10023_writereg (state, 0x00, reg0 | 0x01);
  137. state->reg0 = reg0;
  138. return 0;
  139. }
  140. static int tda10023_set_symbolrate (struct tda10023_state* state, u32 sr)
  141. {
  142. s32 BDR;
  143. s32 BDRI;
  144. s16 SFIL=0;
  145. u16 NDEC = 0;
  146. /* avoid floating point operations multiplying syscloc and divider
  147. by 10 */
  148. u32 sysclk_x_10 = state->sysclk * 10;
  149. if (sr < (u32)(sysclk_x_10/984)) {
  150. NDEC=3;
  151. SFIL=1;
  152. } else if (sr < (u32)(sysclk_x_10/640)) {
  153. NDEC=3;
  154. SFIL=0;
  155. } else if (sr < (u32)(sysclk_x_10/492)) {
  156. NDEC=2;
  157. SFIL=1;
  158. } else if (sr < (u32)(sysclk_x_10/320)) {
  159. NDEC=2;
  160. SFIL=0;
  161. } else if (sr < (u32)(sysclk_x_10/246)) {
  162. NDEC=1;
  163. SFIL=1;
  164. } else if (sr < (u32)(sysclk_x_10/160)) {
  165. NDEC=1;
  166. SFIL=0;
  167. } else if (sr < (u32)(sysclk_x_10/123)) {
  168. NDEC=0;
  169. SFIL=1;
  170. }
  171. BDRI = (state->sysclk)*16;
  172. BDRI>>=NDEC;
  173. BDRI +=sr/2;
  174. BDRI /=sr;
  175. if (BDRI>255)
  176. BDRI=255;
  177. {
  178. u64 BDRX;
  179. BDRX=1<<(24+NDEC);
  180. BDRX*=sr;
  181. do_div(BDRX, state->sysclk); /* BDRX/=SYSCLK; */
  182. BDR=(s32)BDRX;
  183. }
  184. dprintk("Symbolrate %i, BDR %i BDRI %i, NDEC %i\n",
  185. sr, BDR, BDRI, NDEC);
  186. tda10023_writebit (state, 0x03, 0xc0, NDEC<<6);
  187. tda10023_writereg (state, 0x0a, BDR&255);
  188. tda10023_writereg (state, 0x0b, (BDR>>8)&255);
  189. tda10023_writereg (state, 0x0c, (BDR>>16)&31);
  190. tda10023_writereg (state, 0x0d, BDRI);
  191. tda10023_writereg (state, 0x3d, (SFIL<<7));
  192. return 0;
  193. }
  194. static int tda10023_init (struct dvb_frontend *fe)
  195. {
  196. struct tda10023_state* state = fe->demodulator_priv;
  197. u8 tda10023_inittab[] = {
  198. /* reg mask val */
  199. /* 000 */ 0x2a, 0xff, 0x02, /* PLL3, Bypass, Power Down */
  200. /* 003 */ 0xff, 0x64, 0x00, /* Sleep 100ms */
  201. /* 006 */ 0x2a, 0xff, 0x03, /* PLL3, Bypass, Power Down */
  202. /* 009 */ 0xff, 0x64, 0x00, /* Sleep 100ms */
  203. /* PLL1 */
  204. /* 012 */ 0x28, 0xff, (state->pll_m-1),
  205. /* PLL2 */
  206. /* 015 */ 0x29, 0xff, ((state->pll_p-1)<<6)|(state->pll_n-1),
  207. /* GPR FSAMPLING=1 */
  208. /* 018 */ 0x00, 0xff, REG0_INIT_VAL,
  209. /* 021 */ 0x2a, 0xff, 0x08, /* PLL3 PSACLK=1 */
  210. /* 024 */ 0xff, 0x64, 0x00, /* Sleep 100ms */
  211. /* 027 */ 0x1f, 0xff, 0x00, /* RESET */
  212. /* 030 */ 0xff, 0x64, 0x00, /* Sleep 100ms */
  213. /* 033 */ 0xe6, 0x0c, 0x04, /* RSCFG_IND */
  214. /* 036 */ 0x10, 0xc0, 0x80, /* DECDVBCFG1 PBER=1 */
  215. /* 039 */ 0x0e, 0xff, 0x82, /* GAIN1 */
  216. /* 042 */ 0x03, 0x08, 0x08, /* CLKCONF DYN=1 */
  217. /* 045 */ 0x2e, 0xbf, 0x30, /* AGCCONF2 TRIAGC=0,POSAGC=ENAGCIF=1
  218. PPWMTUN=0 PPWMIF=0 */
  219. /* 048 */ 0x01, 0xff, 0x30, /* AGCREF */
  220. /* 051 */ 0x1e, 0x84, 0x84, /* CONTROL SACLK_ON=1 */
  221. /* 054 */ 0x1b, 0xff, 0xc8, /* ADC TWOS=1 */
  222. /* 057 */ 0x3b, 0xff, 0xff, /* IFMAX */
  223. /* 060 */ 0x3c, 0xff, 0x00, /* IFMIN */
  224. /* 063 */ 0x34, 0xff, 0x00, /* PWMREF */
  225. /* 066 */ 0x35, 0xff, 0xff, /* TUNMAX */
  226. /* 069 */ 0x36, 0xff, 0x00, /* TUNMIN */
  227. /* 072 */ 0x06, 0xff, 0x7f, /* EQCONF1 POSI=7 ENADAPT=ENEQUAL=DFE=1 */
  228. /* 075 */ 0x1c, 0x30, 0x30, /* EQCONF2 STEPALGO=SGNALGO=1 */
  229. /* 078 */ 0x37, 0xff, 0xf6, /* DELTAF_LSB */
  230. /* 081 */ 0x38, 0xff, 0xff, /* DELTAF_MSB */
  231. /* 084 */ 0x02, 0xff, 0x93, /* AGCCONF1 IFS=1 KAGCIF=2 KAGCTUN=3 */
  232. /* 087 */ 0x2d, 0xff, 0xf6, /* SWEEP SWPOS=1 SWDYN=7 SWSTEP=1 SWLEN=2 */
  233. /* 090 */ 0x04, 0x10, 0x00, /* SWRAMP=1 */
  234. /* 093 */ 0x12, 0xff, TDA10023_OUTPUT_MODE_PARALLEL_B, /*
  235. INTP1 POCLKP=1 FEL=1 MFS=0 */
  236. /* 096 */ 0x2b, 0x01, 0xa1, /* INTS1 */
  237. /* 099 */ 0x20, 0xff, 0x04, /* INTP2 SWAPP=? MSBFIRSTP=? INTPSEL=? */
  238. /* 102 */ 0x2c, 0xff, 0x0d, /* INTP/S TRIP=0 TRIS=0 */
  239. /* 105 */ 0xc4, 0xff, 0x00,
  240. /* 108 */ 0xc3, 0x30, 0x00,
  241. /* 111 */ 0xb5, 0xff, 0x19, /* ERAGC_THD */
  242. /* 114 */ 0x00, 0x03, 0x01, /* GPR, CLBS soft reset */
  243. /* 117 */ 0x00, 0x03, 0x03, /* GPR, CLBS soft reset */
  244. /* 120 */ 0xff, 0x64, 0x00, /* Sleep 100ms */
  245. /* 123 */ 0xff, 0xff, 0xff
  246. };
  247. dprintk("DVB: TDA10023(%d): init chip\n", fe->dvb->num);
  248. /* override default values if set in config */
  249. if (state->config->deltaf) {
  250. tda10023_inittab[80] = (state->config->deltaf & 0xff);
  251. tda10023_inittab[83] = (state->config->deltaf >> 8);
  252. }
  253. if (state->config->output_mode)
  254. tda10023_inittab[95] = state->config->output_mode;
  255. tda10023_writetab(state, tda10023_inittab);
  256. return 0;
  257. }
  258. static int tda10023_set_parameters (struct dvb_frontend *fe,
  259. struct dvb_frontend_parameters *p)
  260. {
  261. struct tda10023_state* state = fe->demodulator_priv;
  262. static int qamvals[6][6] = {
  263. // QAM LOCKTHR MSETH AREF AGCREFNYQ ERAGCNYQ_THD
  264. { (5<<2), 0x78, 0x8c, 0x96, 0x78, 0x4c }, // 4 QAM
  265. { (0<<2), 0x87, 0xa2, 0x91, 0x8c, 0x57 }, // 16 QAM
  266. { (1<<2), 0x64, 0x74, 0x96, 0x8c, 0x57 }, // 32 QAM
  267. { (2<<2), 0x46, 0x43, 0x6a, 0x6a, 0x44 }, // 64 QAM
  268. { (3<<2), 0x36, 0x34, 0x7e, 0x78, 0x4c }, // 128 QAM
  269. { (4<<2), 0x26, 0x23, 0x6c, 0x5c, 0x3c }, // 256 QAM
  270. };
  271. int qam = p->u.qam.modulation;
  272. if (qam < 0 || qam > 5)
  273. return -EINVAL;
  274. if (fe->ops.tuner_ops.set_params) {
  275. fe->ops.tuner_ops.set_params(fe, p);
  276. if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
  277. }
  278. tda10023_set_symbolrate (state, p->u.qam.symbol_rate);
  279. tda10023_writereg (state, 0x05, qamvals[qam][1]);
  280. tda10023_writereg (state, 0x08, qamvals[qam][2]);
  281. tda10023_writereg (state, 0x09, qamvals[qam][3]);
  282. tda10023_writereg (state, 0xb4, qamvals[qam][4]);
  283. tda10023_writereg (state, 0xb6, qamvals[qam][5]);
  284. // tda10023_writereg (state, 0x04, (p->inversion?0x12:0x32));
  285. // tda10023_writebit (state, 0x04, 0x60, (p->inversion?0:0x20));
  286. tda10023_writebit (state, 0x04, 0x40, 0x40);
  287. tda10023_setup_reg0 (state, qamvals[qam][0]);
  288. return 0;
  289. }
  290. static int tda10023_read_status(struct dvb_frontend* fe, fe_status_t* status)
  291. {
  292. struct tda10023_state* state = fe->demodulator_priv;
  293. int sync;
  294. *status = 0;
  295. //0x11[1] == CARLOCK -> Carrier locked
  296. //0x11[2] == FSYNC -> Frame synchronisation
  297. //0x11[3] == FEL -> Front End locked
  298. //0x11[6] == NODVB -> DVB Mode Information
  299. sync = tda10023_readreg (state, 0x11);
  300. if (sync & 2)
  301. *status |= FE_HAS_SIGNAL|FE_HAS_CARRIER;
  302. if (sync & 4)
  303. *status |= FE_HAS_SYNC|FE_HAS_VITERBI;
  304. if (sync & 8)
  305. *status |= FE_HAS_LOCK;
  306. return 0;
  307. }
  308. static int tda10023_read_ber(struct dvb_frontend* fe, u32* ber)
  309. {
  310. struct tda10023_state* state = fe->demodulator_priv;
  311. u8 a,b,c;
  312. a=tda10023_readreg(state, 0x14);
  313. b=tda10023_readreg(state, 0x15);
  314. c=tda10023_readreg(state, 0x16)&0xf;
  315. tda10023_writebit (state, 0x10, 0xc0, 0x00);
  316. *ber = a | (b<<8)| (c<<16);
  317. return 0;
  318. }
  319. static int tda10023_read_signal_strength(struct dvb_frontend* fe, u16* strength)
  320. {
  321. struct tda10023_state* state = fe->demodulator_priv;
  322. u8 ifgain=tda10023_readreg(state, 0x2f);
  323. u16 gain = ((255-tda10023_readreg(state, 0x17))) + (255-ifgain)/16;
  324. // Max raw value is about 0xb0 -> Normalize to >0xf0 after 0x90
  325. if (gain>0x90)
  326. gain=gain+2*(gain-0x90);
  327. if (gain>255)
  328. gain=255;
  329. *strength = (gain<<8)|gain;
  330. return 0;
  331. }
  332. static int tda10023_read_snr(struct dvb_frontend* fe, u16* snr)
  333. {
  334. struct tda10023_state* state = fe->demodulator_priv;
  335. u8 quality = ~tda10023_readreg(state, 0x18);
  336. *snr = (quality << 8) | quality;
  337. return 0;
  338. }
  339. static int tda10023_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
  340. {
  341. struct tda10023_state* state = fe->demodulator_priv;
  342. u8 a,b,c,d;
  343. a= tda10023_readreg (state, 0x74);
  344. b= tda10023_readreg (state, 0x75);
  345. c= tda10023_readreg (state, 0x76);
  346. d= tda10023_readreg (state, 0x77);
  347. *ucblocks = a | (b<<8)|(c<<16)|(d<<24);
  348. tda10023_writebit (state, 0x10, 0x20,0x00);
  349. tda10023_writebit (state, 0x10, 0x20,0x20);
  350. tda10023_writebit (state, 0x13, 0x01, 0x00);
  351. return 0;
  352. }
  353. static int tda10023_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p)
  354. {
  355. struct tda10023_state* state = fe->demodulator_priv;
  356. int sync,inv;
  357. s8 afc = 0;
  358. sync = tda10023_readreg(state, 0x11);
  359. afc = tda10023_readreg(state, 0x19);
  360. inv = tda10023_readreg(state, 0x04);
  361. if (verbose) {
  362. /* AFC only valid when carrier has been recovered */
  363. printk(sync & 2 ? "DVB: TDA10023(%d): AFC (%d) %dHz\n" :
  364. "DVB: TDA10023(%d): [AFC (%d) %dHz]\n",
  365. state->frontend.dvb->num, afc,
  366. -((s32)p->u.qam.symbol_rate * afc) >> 10);
  367. }
  368. p->inversion = (inv&0x20?0:1);
  369. p->u.qam.modulation = ((state->reg0 >> 2) & 7) + QAM_16;
  370. p->u.qam.fec_inner = FEC_NONE;
  371. p->frequency = ((p->frequency + 31250) / 62500) * 62500;
  372. if (sync & 2)
  373. p->frequency -= ((s32)p->u.qam.symbol_rate * afc) >> 10;
  374. return 0;
  375. }
  376. static int tda10023_sleep(struct dvb_frontend* fe)
  377. {
  378. struct tda10023_state* state = fe->demodulator_priv;
  379. tda10023_writereg (state, 0x1b, 0x02); /* pdown ADC */
  380. tda10023_writereg (state, 0x00, 0x80); /* standby */
  381. return 0;
  382. }
  383. static int tda10023_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
  384. {
  385. struct tda10023_state* state = fe->demodulator_priv;
  386. if (enable) {
  387. lock_tuner(state);
  388. } else {
  389. unlock_tuner(state);
  390. }
  391. return 0;
  392. }
  393. static void tda10023_release(struct dvb_frontend* fe)
  394. {
  395. struct tda10023_state* state = fe->demodulator_priv;
  396. kfree(state);
  397. }
  398. static struct dvb_frontend_ops tda10023_ops;
  399. struct dvb_frontend *tda10023_attach(const struct tda10023_config *config,
  400. struct i2c_adapter *i2c,
  401. u8 pwm)
  402. {
  403. struct tda10023_state* state = NULL;
  404. /* allocate memory for the internal state */
  405. state = kzalloc(sizeof(struct tda10023_state), GFP_KERNEL);
  406. if (state == NULL) goto error;
  407. /* setup the state */
  408. state->config = config;
  409. state->i2c = i2c;
  410. /* wakeup if in standby */
  411. tda10023_writereg (state, 0x00, 0x33);
  412. /* check if the demod is there */
  413. if ((tda10023_readreg(state, 0x1a) & 0xf0) != 0x70) goto error;
  414. /* create dvb_frontend */
  415. memcpy(&state->frontend.ops, &tda10023_ops, sizeof(struct dvb_frontend_ops));
  416. state->pwm = pwm;
  417. state->reg0 = REG0_INIT_VAL;
  418. if (state->config->xtal) {
  419. state->xtal = state->config->xtal;
  420. state->pll_m = state->config->pll_m;
  421. state->pll_p = state->config->pll_p;
  422. state->pll_n = state->config->pll_n;
  423. } else {
  424. /* set default values if not defined in config */
  425. state->xtal = 28920000;
  426. state->pll_m = 8;
  427. state->pll_p = 4;
  428. state->pll_n = 1;
  429. }
  430. /* calc sysclk */
  431. state->sysclk = (state->xtal * state->pll_m / \
  432. (state->pll_n * state->pll_p));
  433. state->frontend.ops.info.symbol_rate_min = (state->sysclk/2)/64;
  434. state->frontend.ops.info.symbol_rate_max = (state->sysclk/2)/4;
  435. dprintk("DVB: TDA10023 %s: xtal:%d pll_m:%d pll_p:%d pll_n:%d\n",
  436. __func__, state->xtal, state->pll_m, state->pll_p,
  437. state->pll_n);
  438. state->frontend.demodulator_priv = state;
  439. return &state->frontend;
  440. error:
  441. kfree(state);
  442. return NULL;
  443. }
  444. static struct dvb_frontend_ops tda10023_ops = {
  445. .info = {
  446. .name = "Philips TDA10023 DVB-C",
  447. .type = FE_QAM,
  448. .frequency_stepsize = 62500,
  449. .frequency_min = 47000000,
  450. .frequency_max = 862000000,
  451. .symbol_rate_min = 0, /* set in tda10023_attach */
  452. .symbol_rate_max = 0, /* set in tda10023_attach */
  453. .caps = 0x400 | //FE_CAN_QAM_4
  454. FE_CAN_QAM_16 | FE_CAN_QAM_32 | FE_CAN_QAM_64 |
  455. FE_CAN_QAM_128 | FE_CAN_QAM_256 |
  456. FE_CAN_FEC_AUTO
  457. },
  458. .release = tda10023_release,
  459. .init = tda10023_init,
  460. .sleep = tda10023_sleep,
  461. .i2c_gate_ctrl = tda10023_i2c_gate_ctrl,
  462. .set_frontend = tda10023_set_parameters,
  463. .get_frontend = tda10023_get_frontend,
  464. .read_status = tda10023_read_status,
  465. .read_ber = tda10023_read_ber,
  466. .read_signal_strength = tda10023_read_signal_strength,
  467. .read_snr = tda10023_read_snr,
  468. .read_ucblocks = tda10023_read_ucblocks,
  469. };
  470. MODULE_DESCRIPTION("Philips TDA10023 DVB-C demodulator driver");
  471. MODULE_AUTHOR("Georg Acher, Hartmut Birr");
  472. MODULE_LICENSE("GPL");
  473. EXPORT_SYMBOL(tda10023_attach);