aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-i2c.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-06-24 01:05:03 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-24 03:06:39 -0400
commitb45009b0288a96a3458f4f8e93cb776678d41875 (patch)
treec912e8d3dcc625fe92cdd1bac97bab7539fce4d7 /drivers/media/video/cx88/cx88-i2c.c
parent2d03e289ea4b13d78ce55f1ea0b0d45b8f1b34c3 (diff)
[PATCH] v4l: CX88 cards update
This patch adds support for various CX88 cards and allows specifying card addresses. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: cybercide@f2s.com <cybercide@f2s.com> Signed-off-by: Catalin Climov <catalin@climov.com> Signed-off-by: Nickolay V Shmyrev <nshmyrev@yandex.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-i2c.c')
-rw-r--r--drivers/media/video/cx88/cx88-i2c.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c
index 0725b1288f4f..e20adefcfc6c 100644
--- a/drivers/media/video/cx88/cx88-i2c.c
+++ b/drivers/media/video/cx88/cx88-i2c.c
@@ -1,5 +1,5 @@
1/* 1/*
2 $Id: cx88-i2c.c,v 1.20 2005/02/15 15:59:35 kraxel Exp $ 2 $Id: cx88-i2c.c,v 1.23 2005/06/12 04:19:19 mchehab Exp $
3 3
4 cx88-i2c.c -- all the i2c code is here 4 cx88-i2c.c -- all the i2c code is here
5 5
@@ -91,6 +91,7 @@ static int cx8800_bit_getsda(void *data)
91 91
92static int attach_inform(struct i2c_client *client) 92static int attach_inform(struct i2c_client *client)
93{ 93{
94 struct tuner_addr tun_addr;
94 struct cx88_core *core = i2c_get_adapdata(client->adapter); 95 struct cx88_core *core = i2c_get_adapdata(client->adapter);
95 96
96 dprintk(1, "i2c attach [addr=0x%x,client=%s]\n", 97 dprintk(1, "i2c attach [addr=0x%x,client=%s]\n",
@@ -98,8 +99,19 @@ static int attach_inform(struct i2c_client *client)
98 if (!client->driver->command) 99 if (!client->driver->command)
99 return 0; 100 return 0;
100 101
101 if (core->tuner_type != UNSET) 102 if (core->radio_type != UNSET) {
102 client->driver->command(client, TUNER_SET_TYPE, &core->tuner_type); 103 tun_addr.v4l2_tuner = V4L2_TUNER_RADIO;
104 tun_addr.type = core->radio_type;
105 tun_addr.addr = core->radio_addr;
106 client->driver->command(client,TUNER_SET_TYPE_ADDR, &tun_addr);
107 }
108 if (core->tuner_type != UNSET) {
109 tun_addr.v4l2_tuner = V4L2_TUNER_ANALOG_TV;
110 tun_addr.type = core->tuner_type;
111 tun_addr.addr = core->tuner_addr;
112 client->driver->command(client,TUNER_SET_TYPE_ADDR, &tun_addr);
113 }
114
103 if (core->tda9887_conf) 115 if (core->tda9887_conf)
104 client->driver->command(client, TDA9887_SET_CONFIG, &core->tda9887_conf); 116 client->driver->command(client, TDA9887_SET_CONFIG, &core->tda9887_conf);
105 return 0; 117 return 0;