nxt6000.c 15 KB

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