nxt6000.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  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) ? -EIO : 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, u32 bandwidth)
  64. {
  65. u16 nominal_rate;
  66. int result;
  67. switch (bandwidth) {
  68. case 6000000:
  69. nominal_rate = 0x55B7;
  70. break;
  71. case 7000000:
  72. nominal_rate = 0x6400;
  73. break;
  74. case 8000000:
  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,
  85. enum fe_guard_interval guard_interval)
  86. {
  87. switch (guard_interval) {
  88. case GUARD_INTERVAL_1_32:
  89. return nxt6000_writereg(state, OFDM_COR_MODEGUARD, 0x00 | (nxt6000_readreg(state, OFDM_COR_MODEGUARD) & ~0x03));
  90. case GUARD_INTERVAL_1_16:
  91. return nxt6000_writereg(state, OFDM_COR_MODEGUARD, 0x01 | (nxt6000_readreg(state, OFDM_COR_MODEGUARD) & ~0x03));
  92. case GUARD_INTERVAL_AUTO:
  93. case GUARD_INTERVAL_1_8:
  94. return nxt6000_writereg(state, OFDM_COR_MODEGUARD, 0x02 | (nxt6000_readreg(state, OFDM_COR_MODEGUARD) & ~0x03));
  95. case GUARD_INTERVAL_1_4:
  96. return nxt6000_writereg(state, OFDM_COR_MODEGUARD, 0x03 | (nxt6000_readreg(state, OFDM_COR_MODEGUARD) & ~0x03));
  97. default:
  98. return -EINVAL;
  99. }
  100. }
  101. static int nxt6000_set_inversion(struct nxt6000_state *state,
  102. enum fe_spectral_inversion inversion)
  103. {
  104. switch (inversion) {
  105. case INVERSION_OFF:
  106. return nxt6000_writereg(state, OFDM_ITB_CTL, 0x00);
  107. case INVERSION_ON:
  108. return nxt6000_writereg(state, OFDM_ITB_CTL, ITBINV);
  109. default:
  110. return -EINVAL;
  111. }
  112. }
  113. static int
  114. nxt6000_set_transmission_mode(struct nxt6000_state *state,
  115. enum fe_transmit_mode transmission_mode)
  116. {
  117. int result;
  118. switch (transmission_mode) {
  119. case TRANSMISSION_MODE_2K:
  120. if ((result = nxt6000_writereg(state, EN_DMD_RACQ, 0x00 | (nxt6000_readreg(state, EN_DMD_RACQ) & ~0x03))) < 0)
  121. return result;
  122. return nxt6000_writereg(state, OFDM_COR_MODEGUARD, (0x00 << 2) | (nxt6000_readreg(state, OFDM_COR_MODEGUARD) & ~0x04));
  123. case TRANSMISSION_MODE_8K:
  124. case TRANSMISSION_MODE_AUTO:
  125. if ((result = nxt6000_writereg(state, EN_DMD_RACQ, 0x02 | (nxt6000_readreg(state, EN_DMD_RACQ) & ~0x03))) < 0)
  126. return result;
  127. return nxt6000_writereg(state, OFDM_COR_MODEGUARD, (0x01 << 2) | (nxt6000_readreg(state, OFDM_COR_MODEGUARD) & ~0x04));
  128. default:
  129. return -EINVAL;
  130. }
  131. }
  132. static void nxt6000_setup(struct dvb_frontend* fe)
  133. {
  134. struct nxt6000_state* state = fe->demodulator_priv;
  135. nxt6000_writereg(state, RS_COR_SYNC_PARAM, SYNC_PARAM);
  136. nxt6000_writereg(state, BER_CTRL, /*(1 << 2) | */ (0x01 << 1) | 0x01);
  137. nxt6000_writereg(state, VIT_BERTIME_2, 0x00); // BER Timer = 0x000200 * 256 = 131072 bits
  138. nxt6000_writereg(state, VIT_BERTIME_1, 0x02); //
  139. nxt6000_writereg(state, VIT_BERTIME_0, 0x00); //
  140. nxt6000_writereg(state, VIT_COR_INTEN, 0x98); // Enable BER interrupts
  141. nxt6000_writereg(state, VIT_COR_CTL, 0x82); // Enable BER measurement
  142. nxt6000_writereg(state, VIT_COR_CTL, VIT_COR_RESYNC | 0x02 );
  143. nxt6000_writereg(state, OFDM_COR_CTL, (0x01 << 5) | (nxt6000_readreg(state, OFDM_COR_CTL) & 0x0F));
  144. nxt6000_writereg(state, OFDM_COR_MODEGUARD, FORCEMODE8K | 0x02);
  145. nxt6000_writereg(state, OFDM_AGC_CTL, AGCLAST | INITIAL_AGC_BW);
  146. nxt6000_writereg(state, OFDM_ITB_FREQ_1, 0x06);
  147. nxt6000_writereg(state, OFDM_ITB_FREQ_2, 0x31);
  148. nxt6000_writereg(state, OFDM_CAS_CTL, (0x01 << 7) | (0x02 << 3) | 0x04);
  149. nxt6000_writereg(state, CAS_FREQ, 0xBB); /* CHECKME */
  150. nxt6000_writereg(state, OFDM_SYR_CTL, 1 << 2);
  151. nxt6000_writereg(state, OFDM_PPM_CTL_1, PPM256);
  152. nxt6000_writereg(state, OFDM_TRL_NOMINALRATE_1, 0x49);
  153. nxt6000_writereg(state, OFDM_TRL_NOMINALRATE_2, 0x72);
  154. nxt6000_writereg(state, ANALOG_CONTROL_0, 1 << 5);
  155. nxt6000_writereg(state, EN_DMD_RACQ, (1 << 7) | (3 << 4) | 2);
  156. nxt6000_writereg(state, DIAG_CONFIG, TB_SET);
  157. if (state->config->clock_inversion)
  158. nxt6000_writereg(state, SUB_DIAG_MODE_SEL, CLKINVERSION);
  159. else
  160. nxt6000_writereg(state, SUB_DIAG_MODE_SEL, 0);
  161. nxt6000_writereg(state, TS_FORMAT, 0);
  162. }
  163. static void nxt6000_dump_status(struct nxt6000_state *state)
  164. {
  165. u8 val;
  166. /*
  167. printk("RS_COR_STAT: 0x%02X\n", nxt6000_readreg(fe, RS_COR_STAT));
  168. printk("VIT_SYNC_STATUS: 0x%02X\n", nxt6000_readreg(fe, VIT_SYNC_STATUS));
  169. printk("OFDM_COR_STAT: 0x%02X\n", nxt6000_readreg(fe, OFDM_COR_STAT));
  170. printk("OFDM_SYR_STAT: 0x%02X\n", nxt6000_readreg(fe, OFDM_SYR_STAT));
  171. printk("OFDM_TPS_RCVD_1: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_1));
  172. printk("OFDM_TPS_RCVD_2: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_2));
  173. printk("OFDM_TPS_RCVD_3: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_3));
  174. printk("OFDM_TPS_RCVD_4: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_4));
  175. printk("OFDM_TPS_RESERVED_1: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RESERVED_1));
  176. printk("OFDM_TPS_RESERVED_2: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RESERVED_2));
  177. */
  178. printk("NXT6000 status:");
  179. val = nxt6000_readreg(state, RS_COR_STAT);
  180. printk(" DATA DESCR LOCK: %d,", val & 0x01);
  181. printk(" DATA SYNC LOCK: %d,", (val >> 1) & 0x01);
  182. val = nxt6000_readreg(state, VIT_SYNC_STATUS);
  183. printk(" VITERBI LOCK: %d,", (val >> 7) & 0x01);
  184. switch ((val >> 4) & 0x07) {
  185. case 0x00:
  186. printk(" VITERBI CODERATE: 1/2,");
  187. break;
  188. case 0x01:
  189. printk(" VITERBI CODERATE: 2/3,");
  190. break;
  191. case 0x02:
  192. printk(" VITERBI CODERATE: 3/4,");
  193. break;
  194. case 0x03:
  195. printk(" VITERBI CODERATE: 5/6,");
  196. break;
  197. case 0x04:
  198. printk(" VITERBI CODERATE: 7/8,");
  199. break;
  200. default:
  201. printk(" VITERBI CODERATE: Reserved,");
  202. }
  203. val = nxt6000_readreg(state, OFDM_COR_STAT);
  204. printk(" CHCTrack: %d,", (val >> 7) & 0x01);
  205. printk(" TPSLock: %d,", (val >> 6) & 0x01);
  206. printk(" SYRLock: %d,", (val >> 5) & 0x01);
  207. printk(" AGCLock: %d,", (val >> 4) & 0x01);
  208. switch (val & 0x0F) {
  209. case 0x00:
  210. printk(" CoreState: IDLE,");
  211. break;
  212. case 0x02:
  213. printk(" CoreState: WAIT_AGC,");
  214. break;
  215. case 0x03:
  216. printk(" CoreState: WAIT_SYR,");
  217. break;
  218. case 0x04:
  219. printk(" CoreState: WAIT_PPM,");
  220. break;
  221. case 0x01:
  222. printk(" CoreState: WAIT_TRL,");
  223. break;
  224. case 0x05:
  225. printk(" CoreState: WAIT_TPS,");
  226. break;
  227. case 0x06:
  228. printk(" CoreState: MONITOR_TPS,");
  229. break;
  230. default:
  231. printk(" CoreState: Reserved,");
  232. }
  233. val = nxt6000_readreg(state, OFDM_SYR_STAT);
  234. printk(" SYRLock: %d,", (val >> 4) & 0x01);
  235. printk(" SYRMode: %s,", (val >> 2) & 0x01 ? "8K" : "2K");
  236. switch ((val >> 4) & 0x03) {
  237. case 0x00:
  238. printk(" SYRGuard: 1/32,");
  239. break;
  240. case 0x01:
  241. printk(" SYRGuard: 1/16,");
  242. break;
  243. case 0x02:
  244. printk(" SYRGuard: 1/8,");
  245. break;
  246. case 0x03:
  247. printk(" SYRGuard: 1/4,");
  248. break;
  249. }
  250. val = nxt6000_readreg(state, OFDM_TPS_RCVD_3);
  251. switch ((val >> 4) & 0x07) {
  252. case 0x00:
  253. printk(" TPSLP: 1/2,");
  254. break;
  255. case 0x01:
  256. printk(" TPSLP: 2/3,");
  257. break;
  258. case 0x02:
  259. printk(" TPSLP: 3/4,");
  260. break;
  261. case 0x03:
  262. printk(" TPSLP: 5/6,");
  263. break;
  264. case 0x04:
  265. printk(" TPSLP: 7/8,");
  266. break;
  267. default:
  268. printk(" TPSLP: Reserved,");
  269. }
  270. switch (val & 0x07) {
  271. case 0x00:
  272. printk(" TPSHP: 1/2,");
  273. break;
  274. case 0x01:
  275. printk(" TPSHP: 2/3,");
  276. break;
  277. case 0x02:
  278. printk(" TPSHP: 3/4,");
  279. break;
  280. case 0x03:
  281. printk(" TPSHP: 5/6,");
  282. break;
  283. case 0x04:
  284. printk(" TPSHP: 7/8,");
  285. break;
  286. default:
  287. printk(" TPSHP: Reserved,");
  288. }
  289. val = nxt6000_readreg(state, OFDM_TPS_RCVD_4);
  290. printk(" TPSMode: %s,", val & 0x01 ? "8K" : "2K");
  291. switch ((val >> 4) & 0x03) {
  292. case 0x00:
  293. printk(" TPSGuard: 1/32,");
  294. break;
  295. case 0x01:
  296. printk(" TPSGuard: 1/16,");
  297. break;
  298. case 0x02:
  299. printk(" TPSGuard: 1/8,");
  300. break;
  301. case 0x03:
  302. printk(" TPSGuard: 1/4,");
  303. break;
  304. }
  305. /* Strange magic required to gain access to RF_AGC_STATUS */
  306. nxt6000_readreg(state, RF_AGC_VAL_1);
  307. val = nxt6000_readreg(state, RF_AGC_STATUS);
  308. val = nxt6000_readreg(state, RF_AGC_STATUS);
  309. printk(" RF AGC LOCK: %d,", (val >> 4) & 0x01);
  310. printk("\n");
  311. }
  312. static int nxt6000_read_status(struct dvb_frontend *fe, enum fe_status *status)
  313. {
  314. u8 core_status;
  315. struct nxt6000_state* state = fe->demodulator_priv;
  316. *status = 0;
  317. core_status = nxt6000_readreg(state, OFDM_COR_STAT);
  318. if (core_status & AGCLOCKED)
  319. *status |= FE_HAS_SIGNAL;
  320. if (nxt6000_readreg(state, OFDM_SYR_STAT) & GI14_SYR_LOCK)
  321. *status |= FE_HAS_CARRIER;
  322. if (nxt6000_readreg(state, VIT_SYNC_STATUS) & VITINSYNC)
  323. *status |= FE_HAS_VITERBI;
  324. if (nxt6000_readreg(state, RS_COR_STAT) & RSCORESTATUS)
  325. *status |= FE_HAS_SYNC;
  326. if ((core_status & TPSLOCKED) && (*status == (FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI | FE_HAS_SYNC)))
  327. *status |= FE_HAS_LOCK;
  328. if (debug)
  329. nxt6000_dump_status(state);
  330. return 0;
  331. }
  332. static int nxt6000_init(struct dvb_frontend* fe)
  333. {
  334. struct nxt6000_state* state = fe->demodulator_priv;
  335. nxt6000_reset(state);
  336. nxt6000_setup(fe);
  337. return 0;
  338. }
  339. static int nxt6000_set_frontend(struct dvb_frontend *fe)
  340. {
  341. struct dtv_frontend_properties *p = &fe->dtv_property_cache;
  342. struct nxt6000_state* state = fe->demodulator_priv;
  343. int result;
  344. if (fe->ops.tuner_ops.set_params) {
  345. fe->ops.tuner_ops.set_params(fe);
  346. if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
  347. }
  348. result = nxt6000_set_bandwidth(state, p->bandwidth_hz);
  349. if (result < 0)
  350. return result;
  351. result = nxt6000_set_guard_interval(state, p->guard_interval);
  352. if (result < 0)
  353. return result;
  354. result = nxt6000_set_transmission_mode(state, p->transmission_mode);
  355. if (result < 0)
  356. return result;
  357. result = nxt6000_set_inversion(state, p->inversion);
  358. if (result < 0)
  359. return result;
  360. msleep(500);
  361. return 0;
  362. }
  363. static void nxt6000_release(struct dvb_frontend* fe)
  364. {
  365. struct nxt6000_state* state = fe->demodulator_priv;
  366. kfree(state);
  367. }
  368. static int nxt6000_read_snr(struct dvb_frontend* fe, u16* snr)
  369. {
  370. struct nxt6000_state* state = fe->demodulator_priv;
  371. *snr = nxt6000_readreg( state, OFDM_CHC_SNR) / 8;
  372. return 0;
  373. }
  374. static int nxt6000_read_ber(struct dvb_frontend* fe, u32* ber)
  375. {
  376. struct nxt6000_state* state = fe->demodulator_priv;
  377. nxt6000_writereg( state, VIT_COR_INTSTAT, 0x18 );
  378. *ber = (nxt6000_readreg( state, VIT_BER_1 ) << 8 ) |
  379. nxt6000_readreg( state, VIT_BER_0 );
  380. nxt6000_writereg( state, VIT_COR_INTSTAT, 0x18); // Clear BER Done interrupts
  381. return 0;
  382. }
  383. static int nxt6000_read_signal_strength(struct dvb_frontend* fe, u16* signal_strength)
  384. {
  385. struct nxt6000_state* state = fe->demodulator_priv;
  386. *signal_strength = (short) (511 -
  387. (nxt6000_readreg(state, AGC_GAIN_1) +
  388. ((nxt6000_readreg(state, AGC_GAIN_2) & 0x03) << 8)));
  389. return 0;
  390. }
  391. static int nxt6000_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *tune)
  392. {
  393. tune->min_delay_ms = 500;
  394. return 0;
  395. }
  396. static int nxt6000_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
  397. {
  398. struct nxt6000_state* state = fe->demodulator_priv;
  399. if (enable) {
  400. return nxt6000_writereg(state, ENABLE_TUNER_IIC, 0x01);
  401. } else {
  402. return nxt6000_writereg(state, ENABLE_TUNER_IIC, 0x00);
  403. }
  404. }
  405. static struct dvb_frontend_ops nxt6000_ops;
  406. struct dvb_frontend* nxt6000_attach(const struct nxt6000_config* config,
  407. struct i2c_adapter* i2c)
  408. {
  409. struct nxt6000_state* state = NULL;
  410. /* allocate memory for the internal state */
  411. state = kzalloc(sizeof(struct nxt6000_state), GFP_KERNEL);
  412. if (state == NULL) goto error;
  413. /* setup the state */
  414. state->config = config;
  415. state->i2c = i2c;
  416. /* check if the demod is there */
  417. if (nxt6000_readreg(state, OFDM_MSC_REV) != NXT6000ASICDEVICE) goto error;
  418. /* create dvb_frontend */
  419. memcpy(&state->frontend.ops, &nxt6000_ops, sizeof(struct dvb_frontend_ops));
  420. state->frontend.demodulator_priv = state;
  421. return &state->frontend;
  422. error:
  423. kfree(state);
  424. return NULL;
  425. }
  426. static struct dvb_frontend_ops nxt6000_ops = {
  427. .delsys = { SYS_DVBT },
  428. .info = {
  429. .name = "NxtWave NXT6000 DVB-T",
  430. .frequency_min = 0,
  431. .frequency_max = 863250000,
  432. .frequency_stepsize = 62500,
  433. /*.frequency_tolerance = *//* FIXME: 12% of SR */
  434. .symbol_rate_min = 0, /* FIXME */
  435. .symbol_rate_max = 9360000, /* FIXME */
  436. .symbol_rate_tolerance = 4000,
  437. .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
  438. FE_CAN_FEC_4_5 | FE_CAN_FEC_5_6 | FE_CAN_FEC_6_7 |
  439. FE_CAN_FEC_7_8 | FE_CAN_FEC_8_9 | FE_CAN_FEC_AUTO |
  440. FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
  441. FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO |
  442. FE_CAN_HIERARCHY_AUTO,
  443. },
  444. .release = nxt6000_release,
  445. .init = nxt6000_init,
  446. .i2c_gate_ctrl = nxt6000_i2c_gate_ctrl,
  447. .get_tune_settings = nxt6000_fe_get_tune_settings,
  448. .set_frontend = nxt6000_set_frontend,
  449. .read_status = nxt6000_read_status,
  450. .read_ber = nxt6000_read_ber,
  451. .read_signal_strength = nxt6000_read_signal_strength,
  452. .read_snr = nxt6000_read_snr,
  453. };
  454. module_param(debug, int, 0644);
  455. MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
  456. MODULE_DESCRIPTION("NxtWave NXT6000 DVB-T demodulator driver");
  457. MODULE_AUTHOR("Florian Schirmer");
  458. MODULE_LICENSE("GPL");
  459. EXPORT_SYMBOL(nxt6000_attach);