nxt6000.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. /*
  2. NxtWave Communications - NXT6000 demodulator driver
  3. Copyright (C) 2002-2003 Florian Schirmer <jolt@tuxbox.org>
  4. Copyright (C) 2003 Paul Andreassen <paul@andreassen.com.au>
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. */
  17. #include <linux/init.h>
  18. #include <linux/kernel.h>
  19. #include <linux/module.h>
  20. #include <linux/string.h>
  21. #include <linux/slab.h>
  22. #include "dvb_frontend.h"
  23. #include "nxt6000_priv.h"
  24. #include "nxt6000.h"
  25. struct nxt6000_state {
  26. struct i2c_adapter* i2c;
  27. /* configuration settings */
  28. const struct nxt6000_config* config;
  29. struct dvb_frontend frontend;
  30. };
  31. static int debug;
  32. #define dprintk if (debug) printk
  33. static int nxt6000_writereg(struct nxt6000_state* state, u8 reg, u8 data)
  34. {
  35. u8 buf[] = { reg, data };
  36. struct i2c_msg msg = {.addr = state->config->demod_address,.flags = 0,.buf = buf,.len = 2 };
  37. int ret;
  38. if ((ret = i2c_transfer(state->i2c, &msg, 1)) != 1)
  39. dprintk("nxt6000: nxt6000_write error (reg: 0x%02X, data: 0x%02X, ret: %d)\n", reg, data, ret);
  40. return (ret != 1) ? -EFAULT : 0;
  41. }
  42. static u8 nxt6000_readreg(struct nxt6000_state* state, u8 reg)
  43. {
  44. int ret;
  45. u8 b0[] = { reg };
  46. u8 b1[] = { 0 };
  47. struct i2c_msg msgs[] = {
  48. {.addr = state->config->demod_address,.flags = 0,.buf = b0,.len = 1},
  49. {.addr = state->config->demod_address,.flags = I2C_M_RD,.buf = b1,.len = 1}
  50. };
  51. ret = i2c_transfer(state->i2c, msgs, 2);
  52. if (ret != 2)
  53. dprintk("nxt6000: nxt6000_read error (reg: 0x%02X, ret: %d)\n", reg, ret);
  54. return b1[0];
  55. }
  56. static void nxt6000_reset(struct nxt6000_state* state)
  57. {
  58. u8 val;
  59. val = nxt6000_readreg(state, OFDM_COR_CTL);
  60. nxt6000_writereg(state, OFDM_COR_CTL, val & ~COREACT);
  61. nxt6000_writereg(state, OFDM_COR_CTL, val | COREACT);
  62. }
  63. static int nxt6000_set_bandwidth(struct nxt6000_state* state, fe_bandwidth_t bandwidth)
  64. {
  65. u16 nominal_rate;
  66. int result;
  67. switch (bandwidth) {
  68. case BANDWIDTH_6_MHZ:
  69. nominal_rate = 0x55B7;
  70. break;
  71. case BANDWIDTH_7_MHZ:
  72. nominal_rate = 0x6400;
  73. break;
  74. case BANDWIDTH_8_MHZ:
  75. nominal_rate = 0x7249;
  76. break;
  77. default:
  78. return -EINVAL;
  79. }
  80. if ((result = nxt6000_writereg(state, OFDM_TRL_NOMINALRATE_1, nominal_rate & 0xFF)) < 0)
  81. return result;
  82. return nxt6000_writereg(state, OFDM_TRL_NOMINALRATE_2, (nominal_rate >> 8) & 0xFF);
  83. }
  84. static int nxt6000_set_guard_interval(struct nxt6000_state* state, fe_guard_interval_t guard_interval)
  85. {
  86. switch (guard_interval) {
  87. case GUARD_INTERVAL_1_32:
  88. return nxt6000_writereg(state, OFDM_COR_MODEGUARD, 0x00 | (nxt6000_readreg(state, OFDM_COR_MODEGUARD) & ~0x03));
  89. case GUARD_INTERVAL_1_16:
  90. return nxt6000_writereg(state, OFDM_COR_MODEGUARD, 0x01 | (nxt6000_readreg(state, OFDM_COR_MODEGUARD) & ~0x03));
  91. case GUARD_INTERVAL_AUTO:
  92. case GUARD_INTERVAL_1_8:
  93. return nxt6000_writereg(state, OFDM_COR_MODEGUARD, 0x02 | (nxt6000_readreg(state, OFDM_COR_MODEGUARD) & ~0x03));
  94. case GUARD_INTERVAL_1_4:
  95. return nxt6000_writereg(state, OFDM_COR_MODEGUARD, 0x03 | (nxt6000_readreg(state, OFDM_COR_MODEGUARD) & ~0x03));
  96. default:
  97. return -EINVAL;
  98. }
  99. }
  100. static int nxt6000_set_inversion(struct nxt6000_state* state, fe_spectral_inversion_t inversion)
  101. {
  102. switch (inversion) {
  103. case INVERSION_OFF:
  104. return nxt6000_writereg(state, OFDM_ITB_CTL, 0x00);
  105. case INVERSION_ON:
  106. return nxt6000_writereg(state, OFDM_ITB_CTL, ITBINV);
  107. default:
  108. return -EINVAL;
  109. }
  110. }
  111. static int nxt6000_set_transmission_mode(struct nxt6000_state* state, fe_transmit_mode_t transmission_mode)
  112. {
  113. int result;
  114. switch (transmission_mode) {
  115. case TRANSMISSION_MODE_2K:
  116. if ((result = nxt6000_writereg(state, EN_DMD_RACQ, 0x00 | (nxt6000_readreg(state, EN_DMD_RACQ) & ~0x03))) < 0)
  117. return result;
  118. return nxt6000_writereg(state, OFDM_COR_MODEGUARD, (0x00 << 2) | (nxt6000_readreg(state, OFDM_COR_MODEGUARD) & ~0x04));
  119. case TRANSMISSION_MODE_8K:
  120. case TRANSMISSION_MODE_AUTO:
  121. if ((result = nxt6000_writereg(state, EN_DMD_RACQ, 0x02 | (nxt6000_readreg(state, EN_DMD_RACQ) & ~0x03))) < 0)
  122. return result;
  123. return nxt6000_writereg(state, OFDM_COR_MODEGUARD, (0x01 << 2) | (nxt6000_readreg(state, OFDM_COR_MODEGUARD) & ~0x04));
  124. default:
  125. return -EINVAL;
  126. }
  127. }
  128. static void nxt6000_setup(struct dvb_frontend* fe)
  129. {
  130. struct nxt6000_state* state = fe->demodulator_priv;
  131. nxt6000_writereg(state, RS_COR_SYNC_PARAM, SYNC_PARAM);
  132. nxt6000_writereg(state, BER_CTRL, /*(1 << 2) | */ (0x01 << 1) | 0x01);
  133. nxt6000_writereg(state, VIT_BERTIME_2, 0x00); // BER Timer = 0x000200 * 256 = 131072 bits
  134. nxt6000_writereg(state, VIT_BERTIME_1, 0x02); //
  135. nxt6000_writereg(state, VIT_BERTIME_0, 0x00); //
  136. nxt6000_writereg(state, VIT_COR_INTEN, 0x98); // Enable BER interrupts
  137. nxt6000_writereg(state, VIT_COR_CTL, 0x82); // Enable BER measurement
  138. nxt6000_writereg(state, VIT_COR_CTL, VIT_COR_RESYNC | 0x02 );
  139. nxt6000_writereg(state, OFDM_COR_CTL, (0x01 << 5) | (nxt6000_readreg(state, OFDM_COR_CTL) & 0x0F));
  140. nxt6000_writereg(state, OFDM_COR_MODEGUARD, FORCEMODE8K | 0x02);
  141. nxt6000_writereg(state, OFDM_AGC_CTL, AGCLAST | INITIAL_AGC_BW);
  142. nxt6000_writereg(state, OFDM_ITB_FREQ_1, 0x06);
  143. nxt6000_writereg(state, OFDM_ITB_FREQ_2, 0x31);
  144. nxt6000_writereg(state, OFDM_CAS_CTL, (0x01 << 7) | (0x02 << 3) | 0x04);
  145. nxt6000_writereg(state, CAS_FREQ, 0xBB); /* CHECKME */
  146. nxt6000_writereg(state, OFDM_SYR_CTL, 1 << 2);
  147. nxt6000_writereg(state, OFDM_PPM_CTL_1, PPM256);
  148. nxt6000_writereg(state, OFDM_TRL_NOMINALRATE_1, 0x49);
  149. nxt6000_writereg(state, OFDM_TRL_NOMINALRATE_2, 0x72);
  150. nxt6000_writereg(state, ANALOG_CONTROL_0, 1 << 5);
  151. nxt6000_writereg(state, EN_DMD_RACQ, (1 << 7) | (3 << 4) | 2);
  152. nxt6000_writereg(state, DIAG_CONFIG, TB_SET);
  153. if (state->config->clock_inversion)
  154. nxt6000_writereg(state, SUB_DIAG_MODE_SEL, CLKINVERSION);
  155. else
  156. nxt6000_writereg(state, SUB_DIAG_MODE_SEL, 0);
  157. nxt6000_writereg(state, TS_FORMAT, 0);
  158. }
  159. static void nxt6000_dump_status(struct nxt6000_state *state)
  160. {
  161. u8 val;
  162. /*
  163. printk("RS_COR_STAT: 0x%02X\n", nxt6000_readreg(fe, RS_COR_STAT));
  164. printk("VIT_SYNC_STATUS: 0x%02X\n", nxt6000_readreg(fe, VIT_SYNC_STATUS));
  165. printk("OFDM_COR_STAT: 0x%02X\n", nxt6000_readreg(fe, OFDM_COR_STAT));
  166. printk("OFDM_SYR_STAT: 0x%02X\n", nxt6000_readreg(fe, OFDM_SYR_STAT));
  167. printk("OFDM_TPS_RCVD_1: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_1));
  168. printk("OFDM_TPS_RCVD_2: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_2));
  169. printk("OFDM_TPS_RCVD_3: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_3));
  170. printk("OFDM_TPS_RCVD_4: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_4));
  171. printk("OFDM_TPS_RESERVED_1: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RESERVED_1));
  172. printk("OFDM_TPS_RESERVED_2: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RESERVED_2));
  173. */
  174. printk("NXT6000 status:");
  175. val = nxt6000_readreg(state, RS_COR_STAT);
  176. printk(" DATA DESCR LOCK: %d,", val & 0x01);
  177. printk(" DATA SYNC LOCK: %d,", (val >> 1) & 0x01);
  178. val = nxt6000_readreg(state, VIT_SYNC_STATUS);
  179. printk(" VITERBI LOCK: %d,", (val >> 7) & 0x01);
  180. switch ((val >> 4) & 0x07) {
  181. case 0x00:
  182. printk(" VITERBI CODERATE: 1/2,");
  183. break;
  184. case 0x01:
  185. printk(" VITERBI CODERATE: 2/3,");
  186. break;
  187. case 0x02:
  188. printk(" VITERBI CODERATE: 3/4,");
  189. break;
  190. case 0x03:
  191. printk(" VITERBI CODERATE: 5/6,");
  192. break;
  193. case 0x04:
  194. printk(" VITERBI CODERATE: 7/8,");
  195. break;
  196. default:
  197. printk(" VITERBI CODERATE: Reserved,");
  198. }
  199. val = nxt6000_readreg(state, OFDM_COR_STAT);
  200. printk(" CHCTrack: %d,", (val >> 7) & 0x01);
  201. printk(" TPSLock: %d,", (val >> 6) & 0x01);
  202. printk(" SYRLock: %d,", (val >> 5) & 0x01);
  203. printk(" AGCLock: %d,", (val >> 4) & 0x01);
  204. switch (val & 0x0F) {
  205. case 0x00:
  206. printk(" CoreState: IDLE,");
  207. break;
  208. case 0x02:
  209. printk(" CoreState: WAIT_AGC,");
  210. break;
  211. case 0x03:
  212. printk(" CoreState: WAIT_SYR,");
  213. break;
  214. case 0x04:
  215. printk(" CoreState: WAIT_PPM,");
  216. break;
  217. case 0x01:
  218. printk(" CoreState: WAIT_TRL,");
  219. break;
  220. case 0x05:
  221. printk(" CoreState: WAIT_TPS,");
  222. break;
  223. case 0x06:
  224. printk(" CoreState: MONITOR_TPS,");
  225. break;
  226. default:
  227. printk(" CoreState: Reserved,");
  228. }
  229. val = nxt6000_readreg(state, OFDM_SYR_STAT);
  230. printk(" SYRLock: %d,", (val >> 4) & 0x01);
  231. printk(" SYRMode: %s,", (val >> 2) & 0x01 ? "8K" : "2K");
  232. switch ((val >> 4) & 0x03) {
  233. case 0x00:
  234. printk(" SYRGuard: 1/32,");
  235. break;
  236. case 0x01:
  237. printk(" SYRGuard: 1/16,");
  238. break;
  239. case 0x02:
  240. printk(" SYRGuard: 1/8,");
  241. break;
  242. case 0x03:
  243. printk(" SYRGuard: 1/4,");
  244. break;
  245. }
  246. val = nxt6000_readreg(state, OFDM_TPS_RCVD_3);
  247. switch ((val >> 4) & 0x07) {
  248. case 0x00:
  249. printk(" TPSLP: 1/2,");
  250. break;
  251. case 0x01:
  252. printk(" TPSLP: 2/3,");
  253. break;
  254. case 0x02:
  255. printk(" TPSLP: 3/4,");
  256. break;
  257. case 0x03:
  258. printk(" TPSLP: 5/6,");
  259. break;
  260. case 0x04:
  261. printk(" TPSLP: 7/8,");
  262. break;
  263. default:
  264. printk(" TPSLP: Reserved,");
  265. }
  266. switch (val & 0x07) {
  267. case 0x00:
  268. printk(" TPSHP: 1/2,");
  269. break;
  270. case 0x01:
  271. printk(" TPSHP: 2/3,");
  272. break;
  273. case 0x02:
  274. printk(" TPSHP: 3/4,");
  275. break;
  276. case 0x03:
  277. printk(" TPSHP: 5/6,");
  278. break;
  279. case 0x04:
  280. printk(" TPSHP: 7/8,");
  281. break;
  282. default:
  283. printk(" TPSHP: Reserved,");
  284. }
  285. val = nxt6000_readreg(state, OFDM_TPS_RCVD_4);
  286. printk(" TPSMode: %s,", val & 0x01 ? "8K" : "2K");
  287. switch ((val >> 4) & 0x03) {
  288. case 0x00:
  289. printk(" TPSGuard: 1/32,");
  290. break;
  291. case 0x01:
  292. printk(" TPSGuard: 1/16,");
  293. break;
  294. case 0x02:
  295. printk(" TPSGuard: 1/8,");
  296. break;
  297. case 0x03:
  298. printk(" TPSGuard: 1/4,");
  299. break;
  300. }
  301. /* Strange magic required to gain access to RF_AGC_STATUS */
  302. nxt6000_readreg(state, RF_AGC_VAL_1);
  303. val = nxt6000_readreg(state, RF_AGC_STATUS);
  304. val = nxt6000_readreg(state, RF_AGC_STATUS);
  305. printk(" RF AGC LOCK: %d,", (val >> 4) & 0x01);
  306. printk("\n");
  307. }
  308. static int nxt6000_read_status(struct dvb_frontend* fe, fe_status_t* status)
  309. {
  310. u8 core_status;
  311. struct nxt6000_state* state = fe->demodulator_priv;
  312. *status = 0;
  313. core_status = nxt6000_readreg(state, OFDM_COR_STAT);
  314. if (core_status & AGCLOCKED)
  315. *status |= FE_HAS_SIGNAL;
  316. if (nxt6000_readreg(state, OFDM_SYR_STAT) & GI14_SYR_LOCK)
  317. *status |= FE_HAS_CARRIER;
  318. if (nxt6000_readreg(state, VIT_SYNC_STATUS) & VITINSYNC)
  319. *status |= FE_HAS_VITERBI;
  320. if (nxt6000_readreg(state, RS_COR_STAT) & RSCORESTATUS)
  321. *status |= FE_HAS_SYNC;
  322. if ((core_status & TPSLOCKED) && (*status == (FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI | FE_HAS_SYNC)))
  323. *status |= FE_HAS_LOCK;
  324. if (debug)
  325. nxt6000_dump_status(state);
  326. return 0;
  327. }
  328. static int nxt6000_init(struct dvb_frontend* fe)
  329. {
  330. struct nxt6000_state* state = fe->demodulator_priv;
  331. nxt6000_reset(state);
  332. nxt6000_setup(fe);
  333. return 0;
  334. }
  335. static int nxt6000_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *param)
  336. {
  337. struct nxt6000_state* state = fe->demodulator_priv;
  338. int result;
  339. if (fe->ops.tuner_ops.set_params) {
  340. fe->ops.tuner_ops.set_params(fe, param);
  341. if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
  342. }
  343. if ((result = nxt6000_set_bandwidth(state, param->u.ofdm.bandwidth)) < 0)
  344. return result;
  345. if ((result = nxt6000_set_guard_interval(state, param->u.ofdm.guard_interval)) < 0)
  346. return result;
  347. if ((result = nxt6000_set_transmission_mode(state, param->u.ofdm.transmission_mode)) < 0)
  348. return result;
  349. if ((result = nxt6000_set_inversion(state, param->inversion)) < 0)
  350. return result;
  351. msleep(500);
  352. return 0;
  353. }
  354. static void nxt6000_release(struct dvb_frontend* fe)
  355. {
  356. struct nxt6000_state* state = fe->demodulator_priv;
  357. kfree(state);
  358. }
  359. static int nxt6000_read_snr(struct dvb_frontend* fe, u16* snr)
  360. {
  361. struct nxt6000_state* state = fe->demodulator_priv;
  362. *snr = nxt6000_readreg( state, OFDM_CHC_SNR) / 8;
  363. return 0;
  364. }
  365. static int nxt6000_read_ber(struct dvb_frontend* fe, u32* ber)
  366. {
  367. struct nxt6000_state* state = fe->demodulator_priv;
  368. nxt6000_writereg( state, VIT_COR_INTSTAT, 0x18 );
  369. *ber = (nxt6000_readreg( state, VIT_BER_1 ) << 8 ) |
  370. nxt6000_readreg( state, VIT_BER_0 );
  371. nxt6000_writereg( state, VIT_COR_INTSTAT, 0x18); // Clear BER Done interrupts
  372. return 0;
  373. }
  374. static int nxt6000_read_signal_strength(struct dvb_frontend* fe, u16* signal_strength)
  375. {
  376. struct nxt6000_state* state = fe->demodulator_priv;
  377. *signal_strength = (short) (511 -
  378. (nxt6000_readreg(state, AGC_GAIN_1) +
  379. ((nxt6000_readreg(state, AGC_GAIN_2) & 0x03) << 8)));
  380. return 0;
  381. }
  382. static int nxt6000_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *tune)
  383. {
  384. tune->min_delay_ms = 500;
  385. return 0;
  386. }
  387. static int nxt6000_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
  388. {
  389. struct nxt6000_state* state = fe->demodulator_priv;
  390. if (enable) {
  391. return nxt6000_writereg(state, ENABLE_TUNER_IIC, 0x01);
  392. } else {
  393. return nxt6000_writereg(state, ENABLE_TUNER_IIC, 0x00);
  394. }
  395. }
  396. static struct dvb_frontend_ops nxt6000_ops;
  397. struct dvb_frontend* nxt6000_attach(const struct nxt6000_config* config,
  398. struct i2c_adapter* i2c)
  399. {
  400. struct nxt6000_state* state = NULL;
  401. /* allocate memory for the internal state */
  402. state = kzalloc(sizeof(struct nxt6000_state), GFP_KERNEL);
  403. if (state == NULL) goto error;
  404. /* setup the state */
  405. state->config = config;
  406. state->i2c = i2c;
  407. /* check if the demod is there */
  408. if (nxt6000_readreg(state, OFDM_MSC_REV) != NXT6000ASICDEVICE) goto error;
  409. /* create dvb_frontend */
  410. memcpy(&state->frontend.ops, &nxt6000_ops, sizeof(struct dvb_frontend_ops));
  411. state->frontend.demodulator_priv = state;
  412. return &state->frontend;
  413. error:
  414. kfree(state);
  415. return NULL;
  416. }
  417. static struct dvb_frontend_ops nxt6000_ops = {
  418. .info = {
  419. .name = "NxtWave NXT6000 DVB-T",
  420. .type = FE_OFDM,
  421. .frequency_min = 0,
  422. .frequency_max = 863250000,
  423. .frequency_stepsize = 62500,
  424. /*.frequency_tolerance = *//* FIXME: 12% of SR */
  425. .symbol_rate_min = 0, /* FIXME */
  426. .symbol_rate_max = 9360000, /* FIXME */
  427. .symbol_rate_tolerance = 4000,
  428. .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
  429. FE_CAN_FEC_4_5 | FE_CAN_FEC_5_6 | FE_CAN_FEC_6_7 |
  430. FE_CAN_FEC_7_8 | FE_CAN_FEC_8_9 | FE_CAN_FEC_AUTO |
  431. FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
  432. FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO |
  433. FE_CAN_HIERARCHY_AUTO,
  434. },
  435. .release = nxt6000_release,
  436. .init = nxt6000_init,
  437. .i2c_gate_ctrl = nxt6000_i2c_gate_ctrl,
  438. .get_tune_settings = nxt6000_fe_get_tune_settings,
  439. .set_frontend = nxt6000_set_frontend,
  440. .read_status = nxt6000_read_status,
  441. .read_ber = nxt6000_read_ber,
  442. .read_signal_strength = nxt6000_read_signal_strength,
  443. .read_snr = nxt6000_read_snr,
  444. };
  445. module_param(debug, int, 0644);
  446. MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
  447. MODULE_DESCRIPTION("NxtWave NXT6000 DVB-T demodulator driver");
  448. MODULE_AUTHOR("Florian Schirmer");
  449. MODULE_LICENSE("GPL");
  450. EXPORT_SYMBOL(nxt6000_attach);