.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Linux-DVB Driver for DiBcom's DiB0070 base-band RF Tuner. |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2005-9 DiBcom (http://www.dibcom.fr/) |
---|
5 | 6 | * |
---|
6 | | - * This program is free software; you can redistribute it and/or |
---|
7 | | - * modify it under the terms of the GNU General Public License as |
---|
8 | | - * published by the Free Software Foundation; either version 2 of the |
---|
9 | | - * License, or (at your option) any later version. |
---|
10 | | - * |
---|
11 | | - * This program is distributed in the hope that it will be useful, but |
---|
12 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | | - * |
---|
15 | | - * GNU General Public License for more details. |
---|
16 | | - * |
---|
17 | | - * |
---|
18 | 7 | * This code is more or less generated from another driver, please |
---|
19 | 8 | * excuse some codingstyle oddities. |
---|
20 | | - * |
---|
21 | 9 | */ |
---|
22 | 10 | |
---|
23 | 11 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
---|
.. | .. |
---|
201 | 189 | |
---|
202 | 190 | adc = dib0070_read_reg(state, 0x19); |
---|
203 | 191 | |
---|
204 | | - dprintk("CAPTRIM=%hd; ADC = %hd (ADC) & %dmV\n", state->captrim, adc, (u32) adc*(u32)1800/(u32)1024); |
---|
| 192 | + dprintk("CAPTRIM=%d; ADC = %hd (ADC) & %dmV\n", state->captrim, |
---|
| 193 | + adc, (u32)adc * (u32)1800 / (u32)1024); |
---|
205 | 194 | |
---|
206 | 195 | if (adc >= 400) { |
---|
207 | 196 | adc -= 400; |
---|
.. | .. |
---|
212 | 201 | } |
---|
213 | 202 | |
---|
214 | 203 | if (adc < state->adc_diff) { |
---|
215 | | - dprintk("CAPTRIM=%hd is closer to target (%hd/%hd)\n", state->captrim, adc, state->adc_diff); |
---|
| 204 | + dprintk("CAPTRIM=%d is closer to target (%hd/%hd)\n", |
---|
| 205 | + state->captrim, adc, state->adc_diff); |
---|
216 | 206 | state->adc_diff = adc; |
---|
217 | 207 | state->fcaptrim = state->captrim; |
---|
218 | 208 | } |
---|
.. | .. |
---|
376 | 366 | } |
---|
377 | 367 | |
---|
378 | 368 | if (*tune_state == CT_TUNER_START) { |
---|
379 | | - dprintk("Tuning for Band: %hd (%d kHz)\n", band, freq); |
---|
| 369 | + dprintk("Tuning for Band: %d (%d kHz)\n", band, freq); |
---|
380 | 370 | if (state->current_rf != freq) { |
---|
381 | 371 | u8 REFDIV; |
---|
382 | 372 | u32 FBDiv, Rest, FREF, VCOF_kHz; |
---|
.. | .. |
---|
454 | 444 | dib0070_write_reg(state, 0x20, |
---|
455 | 445 | 0x0040 | 0x0020 | 0x0010 | 0x0008 | 0x0002 | 0x0001 | state->current_tune_table_index->tuner_enable); |
---|
456 | 446 | |
---|
457 | | - dprintk("REFDIV: %hd, FREF: %d\n", REFDIV, FREF); |
---|
| 447 | + dprintk("REFDIV: %u, FREF: %d\n", REFDIV, FREF); |
---|
458 | 448 | dprintk("FBDIV: %d, Rest: %d\n", FBDiv, Rest); |
---|
459 | | - dprintk("Num: %hd, Den: %hd, SD: %hd\n", (u16) Rest, Den, (state->lo4 >> 12) & 0x1); |
---|
460 | | - dprintk("HFDIV code: %hd\n", state->current_tune_table_index->hfdiv); |
---|
461 | | - dprintk("VCO = %hd\n", state->current_tune_table_index->vco_band); |
---|
462 | | - dprintk("VCOF: ((%hd*%d) << 1))\n", state->current_tune_table_index->vco_multi, freq); |
---|
| 449 | + dprintk("Num: %u, Den: %u, SD: %d\n", (u16)Rest, Den, |
---|
| 450 | + (state->lo4 >> 12) & 0x1); |
---|
| 451 | + dprintk("HFDIV code: %u\n", |
---|
| 452 | + state->current_tune_table_index->hfdiv); |
---|
| 453 | + dprintk("VCO = %u\n", |
---|
| 454 | + state->current_tune_table_index->vco_band); |
---|
| 455 | + dprintk("VCOF: ((%u*%d) << 1))\n", |
---|
| 456 | + state->current_tune_table_index->vco_multi, |
---|
| 457 | + freq); |
---|
463 | 458 | |
---|
464 | 459 | *tune_state = CT_TUNER_STEP_0; |
---|
465 | 460 | } else { /* we are already tuned to this frequency - the configuration is correct */ |
---|
.. | .. |
---|
767 | 762 | fe->tuner_priv = NULL; |
---|
768 | 763 | return NULL; |
---|
769 | 764 | } |
---|
770 | | -EXPORT_SYMBOL(dib0070_attach); |
---|
| 765 | +EXPORT_SYMBOL_GPL(dib0070_attach); |
---|
771 | 766 | |
---|
772 | 767 | MODULE_AUTHOR("Patrick Boettcher <patrick.boettcher@posteo.de>"); |
---|
773 | 768 | MODULE_DESCRIPTION("Driver for the DiBcom 0070 base-band RF Tuner"); |
---|