aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-i2c.c
diff options
context:
space:
mode:
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;