aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/tuners')
-rw-r--r--drivers/media/tuners/fc2580.c8
-rw-r--r--drivers/media/tuners/fc2580_priv.h9
2 files changed, 8 insertions, 9 deletions
diff --git a/drivers/media/tuners/fc2580.c b/drivers/media/tuners/fc2580.c
index 08838b4b4821..30cee76b5f37 100644
--- a/drivers/media/tuners/fc2580.c
+++ b/drivers/media/tuners/fc2580.c
@@ -46,7 +46,7 @@ static int fc2580_set_params(struct dvb_frontend *fe)
46 int ret, i; 46 int ret, i;
47 unsigned int uitmp, div_ref, div_ref_val, div_n, k, k_cw, div_out; 47 unsigned int uitmp, div_ref, div_ref_val, div_n, k, k_cw, div_out;
48 u64 f_vco; 48 u64 f_vco;
49 u8 u8tmp, synth_config; 49 u8 synth_config;
50 unsigned long timeout; 50 unsigned long timeout;
51 51
52 dev_dbg(&client->dev, 52 dev_dbg(&client->dev,
@@ -249,9 +249,9 @@ static int fc2580_set_params(struct dvb_frontend *fe)
249 if (ret) 249 if (ret)
250 goto err; 250 goto err;
251 251
252 u8tmp = div_u64((u64) dev->clk * fc2580_if_filter_lut[i].mul, 252 uitmp = (unsigned int) 8058000 - (c->bandwidth_hz * 122 / 100 / 2);
253 1000000000); 253 uitmp = div64_u64((u64) dev->clk * uitmp, 1000000000000ULL);
254 ret = regmap_write(dev->regmap, 0x37, u8tmp); 254 ret = regmap_write(dev->regmap, 0x37, uitmp);
255 if (ret) 255 if (ret)
256 goto err; 256 goto err;
257 257
diff --git a/drivers/media/tuners/fc2580_priv.h b/drivers/media/tuners/fc2580_priv.h
index 60f8f6caca11..bd88b0141141 100644
--- a/drivers/media/tuners/fc2580_priv.h
+++ b/drivers/media/tuners/fc2580_priv.h
@@ -64,16 +64,15 @@ static const struct fc2580_pll fc2580_pll_lut[] = {
64 64
65struct fc2580_if_filter { 65struct fc2580_if_filter {
66 u32 freq; 66 u32 freq;
67 u16 mul;
68 u8 r36_val; 67 u8 r36_val;
69 u8 r39_val; 68 u8 r39_val;
70}; 69};
71 70
72static const struct fc2580_if_filter fc2580_if_filter_lut[] = { 71static const struct fc2580_if_filter fc2580_if_filter_lut[] = {
73 { 6000000, 4400, 0x18, 0x00}, 72 { 6000000, 0x18, 0x00},
74 { 7000000, 3910, 0x18, 0x80}, 73 { 7000000, 0x18, 0x80},
75 { 8000000, 3300, 0x18, 0x80}, 74 { 8000000, 0x18, 0x80},
76 {0xffffffff, 3300, 0x18, 0x80}, 75 {0xffffffff, 0x18, 0x80},
77}; 76};
78 77
79struct fc2580_freq_regs { 78struct fc2580_freq_regs {