aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tea5767.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tea5767.c')
-rw-r--r--drivers/media/video/tea5767.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/video/tea5767.c b/drivers/media/video/tea5767.c
index 921fe72f23d5..c2b98f81c192 100644
--- a/drivers/media/video/tea5767.c
+++ b/drivers/media/video/tea5767.c
@@ -62,7 +62,7 @@ extern int tuner_debug;
62 62
63#define TEA5767_PORT1_HIGH 0x01 63#define TEA5767_PORT1_HIGH 0x01
64 64
65/* Forth register */ 65/* Fourth register */
66#define TEA5767_PORT2_HIGH 0x80 66#define TEA5767_PORT2_HIGH 0x80
67/* Chips stops working. Only I2C bus remains on */ 67/* Chips stops working. Only I2C bus remains on */
68#define TEA5767_STDBY 0x40 68#define TEA5767_STDBY 0x40
@@ -85,7 +85,7 @@ extern int tuner_debug;
85/* If activate PORT 1 indicates SEARCH or else it is used as PORT1 */ 85/* If activate PORT 1 indicates SEARCH or else it is used as PORT1 */
86#define TEA5767_SRCH_IND 0x01 86#define TEA5767_SRCH_IND 0x01
87 87
88/* Fiveth register */ 88/* Fifth register */
89 89
90/* By activating, it will use Xtal at 13 MHz as reference for divider */ 90/* By activating, it will use Xtal at 13 MHz as reference for divider */
91#define TEA5767_PLLREF_ENABLE 0x80 91#define TEA5767_PLLREF_ENABLE 0x80
@@ -109,13 +109,13 @@ extern int tuner_debug;
109#define TEA5767_STEREO_MASK 0x80 109#define TEA5767_STEREO_MASK 0x80
110#define TEA5767_IF_CNTR_MASK 0x7f 110#define TEA5767_IF_CNTR_MASK 0x7f
111 111
112/* Four register */ 112/* Fourth register */
113#define TEA5767_ADC_LEVEL_MASK 0xf0 113#define TEA5767_ADC_LEVEL_MASK 0xf0
114 114
115/* should be 0 */ 115/* should be 0 */
116#define TEA5767_CHIP_ID_MASK 0x0f 116#define TEA5767_CHIP_ID_MASK 0x0f
117 117
118/* Fiveth register */ 118/* Fifth register */
119/* Reserved for future extensions */ 119/* Reserved for future extensions */
120#define TEA5767_RESERVED_MASK 0xff 120#define TEA5767_RESERVED_MASK 0xff
121 121
@@ -220,19 +220,19 @@ static void set_radio_freq(struct i2c_client *c, unsigned int frq)
220 tuner_dbg ("TEA5767 radio HIGH LO inject xtal @ 13 MHz\n"); 220 tuner_dbg ("TEA5767 radio HIGH LO inject xtal @ 13 MHz\n");
221 buffer[2] |= TEA5767_HIGH_LO_INJECT; 221 buffer[2] |= TEA5767_HIGH_LO_INJECT;
222 buffer[4] |= TEA5767_PLLREF_ENABLE; 222 buffer[4] |= TEA5767_PLLREF_ENABLE;
223 div = (frq * 4000 / 16 + 700000 + 225000 + 25000) / 50000; 223 div = (frq * (4000 / 16) + 700000 + 225000 + 25000) / 50000;
224 break; 224 break;
225 case TEA5767_LOW_LO_13MHz: 225 case TEA5767_LOW_LO_13MHz:
226 tuner_dbg ("TEA5767 radio LOW LO inject xtal @ 13 MHz\n"); 226 tuner_dbg ("TEA5767 radio LOW LO inject xtal @ 13 MHz\n");
227 227
228 buffer[4] |= TEA5767_PLLREF_ENABLE; 228 buffer[4] |= TEA5767_PLLREF_ENABLE;
229 div = (frq * 4000 / 16 - 700000 - 225000 + 25000) / 50000; 229 div = (frq * (4000 / 16) - 700000 - 225000 + 25000) / 50000;
230 break; 230 break;
231 case TEA5767_LOW_LO_32768: 231 case TEA5767_LOW_LO_32768:
232 tuner_dbg ("TEA5767 radio LOW LO inject xtal @ 32,768 MHz\n"); 232 tuner_dbg ("TEA5767 radio LOW LO inject xtal @ 32,768 MHz\n");
233 buffer[3] |= TEA5767_XTAL_32768; 233 buffer[3] |= TEA5767_XTAL_32768;
234 /* const 700=4000*175 Khz - to adjust freq to right value */ 234 /* const 700=4000*175 Khz - to adjust freq to right value */
235 div = ((frq * 4000 / 16 - 700000 - 225000) + 16384) >> 15; 235 div = ((frq * (4000 / 16) - 700000 - 225000) + 16384) >> 15;
236 break; 236 break;
237 case TEA5767_HIGH_LO_32768: 237 case TEA5767_HIGH_LO_32768:
238 default: 238 default:
@@ -350,8 +350,8 @@ int tea5767_tuner_init(struct i2c_client *c)
350 tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5767HN FM Radio"); 350 tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5767HN FM Radio");
351 strlcpy(c->name, "tea5767", sizeof(c->name)); 351 strlcpy(c->name, "tea5767", sizeof(c->name));
352 352
353 t->tv_freq = set_tv_freq; 353 t->set_tv_freq = set_tv_freq;
354 t->radio_freq = set_radio_freq; 354 t->set_radio_freq = set_radio_freq;
355 t->has_signal = tea5767_signal; 355 t->has_signal = tea5767_signal;
356 t->is_stereo = tea5767_stereo; 356 t->is_stereo = tea5767_stereo;
357 t->standby = tea5767_standby; 357 t->standby = tea5767_standby;