diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-03-07 12:07:01 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-03-07 12:07:01 -0200 |
commit | 55ff4f4df681b35c3491f8e19f7487497e2a4891 (patch) | |
tree | f87aed963d457025ea4ba5fb24dbc017692acb62 /linux/drivers/media/video/tuner-core.c | |
parent | a848141281083e26a67ea94725a531b4602756f7 (diff) | |
download | mediapointer-dvb-s2-55ff4f4df681b35c3491f8e19f7487497e2a4891.tar.gz mediapointer-dvb-s2-55ff4f4df681b35c3491f8e19f7487497e2a4891.tar.bz2 |
Allow using tea5761 radio device on tuner-core
From: Mauro Carvalho Chehab <mchehab@infradead.org>
tea5761 is a driver wrote back on 2005, to support Philips tea5671
radio, meanting to be used on some devices that would be lauched with
those chips.
Recently, some people seems to be interested on having support for those
chips at Linux Kernel.
Let's enable compilation of this driver and ask they to test if this
works fine.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 1aac94868..02fb067e2 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -29,6 +29,9 @@ /* standard i2c insmod options */ static unsigned short normal_i2c[] = { +#ifdef CONFIG_TUNER_5761 + 0x10, +#endif 0x42, 0x43, 0x4a, 0x4b, /* tda8290 */ 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, @@ -216,6 +219,16 @@ static void set_type(struct i2c_client *c, unsigned int type, } t->mode_mask = T_RADIO; break; +#ifdef CONFIG_TUNER_5761 + case TUNER_TEA5761: + if (tea5761_tuner_init(c) == EINVAL) { + t->type = TUNER_ABSENT; + t->mode_mask = T_UNINITIALIZED; + return -ENODEV; + } + t->mode_mask = T_RADIO; + break; +#endif case TUNER_PHILIPS_FMD1216ME_MK3: buffer[0] = 0x0b; buffer[1] = 0xdc; @@ -506,6 +519,19 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, /* autodetection code based on the i2c addr */ if (!no_autodetect) { switch (addr) { +#ifdef CONFIG_TUNER_5761 + case 0x10: + if (tea5761_autodetection(&t->i2c) != EINVAL) { + t->type = TUNER_TEA5761; + t->mode_mask = T_RADIO; + t->mode = T_STANDBY; + t->radio_freq = 87.5 * 16000; /* Sets freq to FM range */ + default_mode_mask &= ~T_RADIO; + + goto register_client; + } + break; +#endif case 0x42: case 0x43: case 0x4a: |