or51211.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. /*
  2. * Support for OR51211 (pcHDTV HD-2000) - VSB
  3. *
  4. * Copyright (C) 2005 Kirk Lapray <kirk_lapray@bigfoot.com>
  5. *
  6. * Based on code from Jack Kelliher (kelliher@xmission.com)
  7. * Copyright (C) 2002 & pcHDTV, inc.
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  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. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. *
  23. */
  24. /*
  25. * This driver needs external firmware. Please use the command
  26. * "<kerneldir>/Documentation/dvb/get_dvb_firmware or51211" to
  27. * download/extract it, and then copy it to /usr/lib/hotplug/firmware.
  28. */
  29. #define OR51211_DEFAULT_FIRMWARE "dvb-fe-or51211.fw"
  30. #include <linux/kernel.h>
  31. #include <linux/module.h>
  32. #include <linux/moduleparam.h>
  33. #include <linux/device.h>
  34. #include <linux/firmware.h>
  35. #include <asm/byteorder.h>
  36. #include "dvb_frontend.h"
  37. #include "or51211.h"
  38. static int debug;
  39. #define dprintk(args...) \
  40. do { \
  41. if (debug) printk(KERN_DEBUG "or51211: " args); \
  42. } while (0)
  43. static u8 run_buf[] = {0x7f,0x01};
  44. static u8 cmd_buf[] = {0x04,0x01,0x50,0x80,0x06}; // ATSC
  45. struct or51211_state {
  46. struct i2c_adapter* i2c;
  47. struct dvb_frontend_ops ops;
  48. /* Configuration settings */
  49. const struct or51211_config* config;
  50. struct dvb_frontend frontend;
  51. struct bt878* bt;
  52. /* Demodulator private data */
  53. u8 initialized:1;
  54. /* Tuner private data */
  55. u32 current_frequency;
  56. };
  57. static int i2c_writebytes (struct or51211_state* state, u8 reg, u8 *buf,
  58. int len)
  59. {
  60. int err;
  61. struct i2c_msg msg;
  62. msg.addr = reg;
  63. msg.flags = 0;
  64. msg.len = len;
  65. msg.buf = buf;
  66. if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) {
  67. printk(KERN_WARNING "or51211: i2c_writebytes error "
  68. "(addr %02x, err == %i)\n", reg, err);
  69. return -EREMOTEIO;
  70. }
  71. return 0;
  72. }
  73. static u8 i2c_readbytes (struct or51211_state* state, u8 reg, u8* buf, int len)
  74. {
  75. int err;
  76. struct i2c_msg msg;
  77. msg.addr = reg;
  78. msg.flags = I2C_M_RD;
  79. msg.len = len;
  80. msg.buf = buf;
  81. if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) {
  82. printk(KERN_WARNING "or51211: i2c_readbytes error "
  83. "(addr %02x, err == %i)\n", reg, err);
  84. return -EREMOTEIO;
  85. }
  86. return 0;
  87. }
  88. static int or51211_load_firmware (struct dvb_frontend* fe,
  89. const struct firmware *fw)
  90. {
  91. struct or51211_state* state = fe->demodulator_priv;
  92. u8 tudata[585];
  93. int i;
  94. dprintk("Firmware is %d bytes\n",fw->size);
  95. /* Get eprom data */
  96. tudata[0] = 17;
  97. if (i2c_writebytes(state,0x50,tudata,1)) {
  98. printk(KERN_WARNING "or51211:load_firmware error eprom addr\n");
  99. return -1;
  100. }
  101. if (i2c_readbytes(state,0x50,&tudata[145],192)) {
  102. printk(KERN_WARNING "or51211: load_firmware error eprom\n");
  103. return -1;
  104. }
  105. /* Create firmware buffer */
  106. for (i = 0; i < 145; i++)
  107. tudata[i] = fw->data[i];
  108. for (i = 0; i < 248; i++)
  109. tudata[i+337] = fw->data[145+i];
  110. state->config->reset(fe);
  111. if (i2c_writebytes(state,state->config->demod_address,tudata,585)) {
  112. printk(KERN_WARNING "or51211: load_firmware error 1\n");
  113. return -1;
  114. }
  115. msleep(1);
  116. if (i2c_writebytes(state,state->config->demod_address,
  117. &fw->data[393],8125)) {
  118. printk(KERN_WARNING "or51211: load_firmware error 2\n");
  119. return -1;
  120. }
  121. msleep(1);
  122. if (i2c_writebytes(state,state->config->demod_address,run_buf,2)) {
  123. printk(KERN_WARNING "or51211: load_firmware error 3\n");
  124. return -1;
  125. }
  126. /* Wait at least 5 msec */
  127. msleep(10);
  128. if (i2c_writebytes(state,state->config->demod_address,run_buf,2)) {
  129. printk(KERN_WARNING "or51211: load_firmware error 4\n");
  130. return -1;
  131. }
  132. msleep(10);
  133. printk("or51211: Done.\n");
  134. return 0;
  135. };
  136. static int or51211_setmode(struct dvb_frontend* fe, int mode)
  137. {
  138. struct or51211_state* state = fe->demodulator_priv;
  139. u8 rec_buf[14];
  140. state->config->setmode(fe, mode);
  141. if (i2c_writebytes(state,state->config->demod_address,run_buf,2)) {
  142. printk(KERN_WARNING "or51211: setmode error 1\n");
  143. return -1;
  144. }
  145. /* Wait at least 5 msec */
  146. msleep(10);
  147. if (i2c_writebytes(state,state->config->demod_address,run_buf,2)) {
  148. printk(KERN_WARNING "or51211: setmode error 2\n");
  149. return -1;
  150. }
  151. msleep(10);
  152. /* Set operation mode in Receiver 1 register;
  153. * type 1:
  154. * data 0x50h Automatic sets receiver channel conditions
  155. * Automatic NTSC rejection filter
  156. * Enable MPEG serial data output
  157. * MPEG2tr
  158. * High tuner phase noise
  159. * normal +/-150kHz Carrier acquisition range
  160. */
  161. if (i2c_writebytes(state,state->config->demod_address,cmd_buf,3)) {
  162. printk(KERN_WARNING "or51211: setmode error 3\n");
  163. return -1;
  164. }
  165. rec_buf[0] = 0x04;
  166. rec_buf[1] = 0x00;
  167. rec_buf[2] = 0x03;
  168. rec_buf[3] = 0x00;
  169. msleep(20);
  170. if (i2c_writebytes(state,state->config->demod_address,rec_buf,3)) {
  171. printk(KERN_WARNING "or51211: setmode error 5\n");
  172. }
  173. msleep(3);
  174. if (i2c_readbytes(state,state->config->demod_address,&rec_buf[10],2)) {
  175. printk(KERN_WARNING "or51211: setmode error 6");
  176. return -1;
  177. }
  178. dprintk("setmode rec status %02x %02x\n",rec_buf[10],rec_buf[11]);
  179. return 0;
  180. }
  181. static int or51211_set_parameters(struct dvb_frontend* fe,
  182. struct dvb_frontend_parameters *param)
  183. {
  184. struct or51211_state* state = fe->demodulator_priv;
  185. u32 freq = 0;
  186. u16 tunerfreq = 0;
  187. u8 buf[4];
  188. /* Change only if we are actually changing the channel */
  189. if (state->current_frequency != param->frequency) {
  190. freq = 44000 + (param->frequency/1000);
  191. tunerfreq = freq * 16/1000;
  192. dprintk("set_parameters frequency = %d (tunerfreq = %d)\n",
  193. param->frequency,tunerfreq);
  194. buf[0] = (tunerfreq >> 8) & 0x7F;
  195. buf[1] = (tunerfreq & 0xFF);
  196. buf[2] = 0x8E;
  197. if (param->frequency < 157250000) {
  198. buf[3] = 0xA0;
  199. dprintk("set_parameters VHF low range\n");
  200. } else if (param->frequency < 454000000) {
  201. buf[3] = 0x90;
  202. dprintk("set_parameters VHF high range\n");
  203. } else {
  204. buf[3] = 0x30;
  205. dprintk("set_parameters UHF range\n");
  206. }
  207. dprintk("set_parameters tuner bytes: 0x%02x 0x%02x "
  208. "0x%02x 0x%02x\n",buf[0],buf[1],buf[2],buf[3]);
  209. if (i2c_writebytes(state,0xC2>>1,buf,4))
  210. printk(KERN_WARNING "or51211:set_parameters error "
  211. "writing to tuner\n");
  212. /* Set to ATSC mode */
  213. or51211_setmode(fe,0);
  214. /* Update current frequency */
  215. state->current_frequency = param->frequency;
  216. }
  217. return 0;
  218. }
  219. static int or51211_read_status(struct dvb_frontend* fe, fe_status_t* status)
  220. {
  221. struct or51211_state* state = fe->demodulator_priv;
  222. unsigned char rec_buf[2];
  223. unsigned char snd_buf[] = {0x04,0x00,0x03,0x00};
  224. *status = 0;
  225. /* Receiver Status */
  226. if (i2c_writebytes(state,state->config->demod_address,snd_buf,3)) {
  227. printk(KERN_WARNING "or51132: read_status write error\n");
  228. return -1;
  229. }
  230. msleep(3);
  231. if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) {
  232. printk(KERN_WARNING "or51132: read_status read error\n");
  233. return -1;
  234. }
  235. dprintk("read_status %x %x\n",rec_buf[0],rec_buf[1]);
  236. if (rec_buf[0] & 0x01) { /* Receiver Lock */
  237. *status |= FE_HAS_SIGNAL;
  238. *status |= FE_HAS_CARRIER;
  239. *status |= FE_HAS_VITERBI;
  240. *status |= FE_HAS_SYNC;
  241. *status |= FE_HAS_LOCK;
  242. }
  243. return 0;
  244. }
  245. /* log10-1 table at .5 increments from 1 to 100.5 */
  246. static unsigned int i100x20log10[] = {
  247. 0, 352, 602, 795, 954, 1088, 1204, 1306, 1397, 1480,
  248. 1556, 1625, 1690, 1750, 1806, 1858, 1908, 1955, 2000, 2042,
  249. 2082, 2121, 2158, 2193, 2227, 2260, 2292, 2322, 2352, 2380,
  250. 2408, 2434, 2460, 2486, 2510, 2534, 2557, 2580, 2602, 2623,
  251. 2644, 2664, 2684, 2704, 2723, 2742, 2760, 2778, 2795, 2813,
  252. 2829, 2846, 2862, 2878, 2894, 2909, 2924, 2939, 2954, 2968,
  253. 2982, 2996, 3010, 3023, 3037, 3050, 3062, 3075, 3088, 3100,
  254. 3112, 3124, 3136, 3148, 3159, 3170, 3182, 3193, 3204, 3214,
  255. 3225, 3236, 3246, 3256, 3266, 3276, 3286, 3296, 3306, 3316,
  256. 3325, 3334, 3344, 3353, 3362, 3371, 3380, 3389, 3397, 3406,
  257. 3415, 3423, 3432, 3440, 3448, 3456, 3464, 3472, 3480, 3488,
  258. 3496, 3504, 3511, 3519, 3526, 3534, 3541, 3549, 3556, 3563,
  259. 3570, 3577, 3584, 3591, 3598, 3605, 3612, 3619, 3625, 3632,
  260. 3639, 3645, 3652, 3658, 3665, 3671, 3677, 3683, 3690, 3696,
  261. 3702, 3708, 3714, 3720, 3726, 3732, 3738, 3744, 3750, 3755,
  262. 3761, 3767, 3772, 3778, 3784, 3789, 3795, 3800, 3806, 3811,
  263. 3816, 3822, 3827, 3832, 3838, 3843, 3848, 3853, 3858, 3863,
  264. 3868, 3874, 3879, 3884, 3888, 3893, 3898, 3903, 3908, 3913,
  265. 3918, 3922, 3927, 3932, 3936, 3941, 3946, 3950, 3955, 3960,
  266. 3964, 3969, 3973, 3978, 3982, 3986, 3991, 3995, 4000, 4004,
  267. };
  268. static unsigned int denom[] = {1,1,100,1000,10000,100000,1000000,10000000,100000000};
  269. static unsigned int i20Log10(unsigned short val)
  270. {
  271. unsigned int rntval = 100;
  272. unsigned int tmp = val;
  273. unsigned int exp = 1;
  274. while(tmp > 100) {tmp /= 100; exp++;}
  275. val = (2 * val)/denom[exp];
  276. if (exp > 1) rntval = 2000*exp;
  277. rntval += i100x20log10[val];
  278. return rntval;
  279. }
  280. static int or51211_read_signal_strength(struct dvb_frontend* fe, u16* strength)
  281. {
  282. struct or51211_state* state = fe->demodulator_priv;
  283. u8 rec_buf[2];
  284. u8 snd_buf[4];
  285. u8 snr_equ;
  286. /* SNR after Equalizer */
  287. snd_buf[0] = 0x04;
  288. snd_buf[1] = 0x00;
  289. snd_buf[2] = 0x04;
  290. snd_buf[3] = 0x00;
  291. if (i2c_writebytes(state,state->config->demod_address,snd_buf,3)) {
  292. printk(KERN_WARNING "or51211: read_status write error\n");
  293. return -1;
  294. }
  295. msleep(3);
  296. if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) {
  297. printk(KERN_WARNING "or51211: read_status read error\n");
  298. return -1;
  299. }
  300. snr_equ = rec_buf[0] & 0xff;
  301. /* The value reported back from the frontend will be FFFF=100% 0000=0% */
  302. *strength = (((5334 - i20Log10(snr_equ))/3+5)*65535)/1000;
  303. dprintk("read_signal_strength %i\n",*strength);
  304. return 0;
  305. }
  306. static int or51211_read_snr(struct dvb_frontend* fe, u16* snr)
  307. {
  308. struct or51211_state* state = fe->demodulator_priv;
  309. u8 rec_buf[2];
  310. u8 snd_buf[4];
  311. /* SNR after Equalizer */
  312. snd_buf[0] = 0x04;
  313. snd_buf[1] = 0x00;
  314. snd_buf[2] = 0x04;
  315. snd_buf[3] = 0x00;
  316. if (i2c_writebytes(state,state->config->demod_address,snd_buf,3)) {
  317. printk(KERN_WARNING "or51211: read_status write error\n");
  318. return -1;
  319. }
  320. msleep(3);
  321. if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) {
  322. printk(KERN_WARNING "or51211: read_status read error\n");
  323. return -1;
  324. }
  325. *snr = rec_buf[0] & 0xff;
  326. dprintk("read_snr %i\n",*snr);
  327. return 0;
  328. }
  329. static int or51211_read_ber(struct dvb_frontend* fe, u32* ber)
  330. {
  331. *ber = -ENOSYS;
  332. return 0;
  333. }
  334. static int or51211_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
  335. {
  336. *ucblocks = -ENOSYS;
  337. return 0;
  338. }
  339. static int or51211_sleep(struct dvb_frontend* fe)
  340. {
  341. return 0;
  342. }
  343. static int or51211_init(struct dvb_frontend* fe)
  344. {
  345. struct or51211_state* state = fe->demodulator_priv;
  346. const struct or51211_config* config = state->config;
  347. const struct firmware* fw;
  348. unsigned char get_ver_buf[] = {0x04,0x00,0x30,0x00,0x00};
  349. unsigned char rec_buf[14];
  350. int ret,i;
  351. if (!state->initialized) {
  352. /* Request the firmware, this will block until it uploads */
  353. printk(KERN_INFO "or51211: Waiting for firmware upload "
  354. "(%s)...\n", OR51211_DEFAULT_FIRMWARE);
  355. ret = config->request_firmware(fe, &fw,
  356. OR51211_DEFAULT_FIRMWARE);
  357. printk(KERN_INFO "or51211:Got Hotplug firmware\n");
  358. if (ret) {
  359. printk(KERN_WARNING "or51211: No firmware uploaded "
  360. "(timeout or file not found?)\n");
  361. return ret;
  362. }
  363. ret = or51211_load_firmware(fe, fw);
  364. if (ret) {
  365. printk(KERN_WARNING "or51211: Writing firmware to "
  366. "device failed!\n");
  367. release_firmware(fw);
  368. return ret;
  369. }
  370. printk(KERN_INFO "or51211: Firmware upload complete.\n");
  371. /* Set operation mode in Receiver 1 register;
  372. * type 1:
  373. * data 0x50h Automatic sets receiver channel conditions
  374. * Automatic NTSC rejection filter
  375. * Enable MPEG serial data output
  376. * MPEG2tr
  377. * High tuner phase noise
  378. * normal +/-150kHz Carrier acquisition range
  379. */
  380. if (i2c_writebytes(state,state->config->demod_address,
  381. cmd_buf,3)) {
  382. printk(KERN_WARNING "or51211: Load DVR Error 5\n");
  383. return -1;
  384. }
  385. /* Read back ucode version to besure we loaded correctly */
  386. /* and are really up and running */
  387. rec_buf[0] = 0x04;
  388. rec_buf[1] = 0x00;
  389. rec_buf[2] = 0x03;
  390. rec_buf[3] = 0x00;
  391. msleep(30);
  392. if (i2c_writebytes(state,state->config->demod_address,
  393. rec_buf,3)) {
  394. printk(KERN_WARNING "or51211: Load DVR Error A\n");
  395. return -1;
  396. }
  397. msleep(3);
  398. if (i2c_readbytes(state,state->config->demod_address,
  399. &rec_buf[10],2)) {
  400. printk(KERN_WARNING "or51211: Load DVR Error B\n");
  401. return -1;
  402. }
  403. rec_buf[0] = 0x04;
  404. rec_buf[1] = 0x00;
  405. rec_buf[2] = 0x01;
  406. rec_buf[3] = 0x00;
  407. msleep(20);
  408. if (i2c_writebytes(state,state->config->demod_address,
  409. rec_buf,3)) {
  410. printk(KERN_WARNING "or51211: Load DVR Error C\n");
  411. return -1;
  412. }
  413. msleep(3);
  414. if (i2c_readbytes(state,state->config->demod_address,
  415. &rec_buf[12],2)) {
  416. printk(KERN_WARNING "or51211: Load DVR Error D\n");
  417. return -1;
  418. }
  419. for (i = 0; i < 8; i++)
  420. rec_buf[i]=0xed;
  421. for (i = 0; i < 5; i++) {
  422. msleep(30);
  423. get_ver_buf[4] = i+1;
  424. if (i2c_writebytes(state,state->config->demod_address,
  425. get_ver_buf,5)) {
  426. printk(KERN_WARNING "or51211:Load DVR Error 6"
  427. " - %d\n",i);
  428. return -1;
  429. }
  430. msleep(3);
  431. if (i2c_readbytes(state,state->config->demod_address,
  432. &rec_buf[i*2],2)) {
  433. printk(KERN_WARNING "or51211:Load DVR Error 7"
  434. " - %d\n",i);
  435. return -1;
  436. }
  437. /* If we didn't receive the right index, try again */
  438. if ((int)rec_buf[i*2+1]!=i+1){
  439. i--;
  440. }
  441. }
  442. dprintk("read_fwbits %x %x %x %x %x %x %x %x %x %x\n",
  443. rec_buf[0], rec_buf[1], rec_buf[2], rec_buf[3],
  444. rec_buf[4], rec_buf[5], rec_buf[6], rec_buf[7],
  445. rec_buf[8], rec_buf[9]);
  446. printk(KERN_INFO "or51211: ver TU%02x%02x%02x VSB mode %02x"
  447. " Status %02x\n",
  448. rec_buf[2], rec_buf[4],rec_buf[6],
  449. rec_buf[12],rec_buf[10]);
  450. rec_buf[0] = 0x04;
  451. rec_buf[1] = 0x00;
  452. rec_buf[2] = 0x03;
  453. rec_buf[3] = 0x00;
  454. msleep(20);
  455. if (i2c_writebytes(state,state->config->demod_address,
  456. rec_buf,3)) {
  457. printk(KERN_WARNING "or51211: Load DVR Error 8\n");
  458. return -1;
  459. }
  460. msleep(20);
  461. if (i2c_readbytes(state,state->config->demod_address,
  462. &rec_buf[8],2)) {
  463. printk(KERN_WARNING "or51211: Load DVR Error 9\n");
  464. return -1;
  465. }
  466. state->initialized = 1;
  467. }
  468. return 0;
  469. }
  470. static int or51211_get_tune_settings(struct dvb_frontend* fe,
  471. struct dvb_frontend_tune_settings* fesettings)
  472. {
  473. fesettings->min_delay_ms = 500;
  474. fesettings->step_size = 0;
  475. fesettings->max_drift = 0;
  476. return 0;
  477. }
  478. static void or51211_release(struct dvb_frontend* fe)
  479. {
  480. struct or51211_state* state = fe->demodulator_priv;
  481. state->config->sleep(fe);
  482. kfree(state);
  483. }
  484. static struct dvb_frontend_ops or51211_ops;
  485. struct dvb_frontend* or51211_attach(const struct or51211_config* config,
  486. struct i2c_adapter* i2c)
  487. {
  488. struct or51211_state* state = NULL;
  489. /* Allocate memory for the internal state */
  490. state = kmalloc(sizeof(struct or51211_state), GFP_KERNEL);
  491. if (state == NULL)
  492. goto error;
  493. /* Setup the state */
  494. state->config = config;
  495. state->i2c = i2c;
  496. memcpy(&state->ops, &or51211_ops, sizeof(struct dvb_frontend_ops));
  497. state->initialized = 0;
  498. state->current_frequency = 0;
  499. /* Create dvb_frontend */
  500. state->frontend.ops = &state->ops;
  501. state->frontend.demodulator_priv = state;
  502. return &state->frontend;
  503. error:
  504. kfree(state);
  505. return NULL;
  506. }
  507. static struct dvb_frontend_ops or51211_ops = {
  508. .info = {
  509. .name = "Oren OR51211 VSB Frontend",
  510. .type = FE_ATSC,
  511. .frequency_min = 44000000,
  512. .frequency_max = 958000000,
  513. .frequency_stepsize = 166666,
  514. .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
  515. FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
  516. FE_CAN_8VSB
  517. },
  518. .release = or51211_release,
  519. .init = or51211_init,
  520. .sleep = or51211_sleep,
  521. .set_frontend = or51211_set_parameters,
  522. .get_tune_settings = or51211_get_tune_settings,
  523. .read_status = or51211_read_status,
  524. .read_ber = or51211_read_ber,
  525. .read_signal_strength = or51211_read_signal_strength,
  526. .read_snr = or51211_read_snr,
  527. .read_ucblocks = or51211_read_ucblocks,
  528. };
  529. module_param(debug, int, 0644);
  530. MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
  531. MODULE_DESCRIPTION("Oren OR51211 VSB [pcHDTV HD-2000] Demodulator Driver");
  532. MODULE_AUTHOR("Kirk Lapray");
  533. MODULE_LICENSE("GPL");
  534. EXPORT_SYMBOL(or51211_attach);