aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/dibusb-common.c
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-09-19 11:51:33 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-10-03 14:12:27 -0400
commit136cafbf4a024b52ba0a10627217f03cea9ff9f8 (patch)
treecf827cb4d792a82a9c7b30bccc0db71547607472 /drivers/media/dvb/dvb-usb/dibusb-common.c
parent6870ab576c86a496869fbd5bb339da7e442ee7f5 (diff)
V4L/DVB (4646): Misc. changes, DiB3000MC, MT2060
Changed the attach-function of the dib3000mc-driver to return only one frontend. In case of multiple dib3000-chips on one board, one has to call the i2c-enumeration manually before. Added a field to Microtune 2060 config to output the clock to other tuners/device on a board. Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dibusb-common.c')
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-common.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c
index 5f8afec96a3b..b4d6e539ff5a 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-common.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-common.c
@@ -230,8 +230,8 @@ static struct dib3000mc_config mod3000p_dib3000p_config = {
230 230
231int dibusb_dib3000mc_frontend_attach(struct dvb_usb_adapter *adap) 231int dibusb_dib3000mc_frontend_attach(struct dvb_usb_adapter *adap)
232{ 232{
233 if (dib3000mc_attach(&adap->dev->i2c_adap, 1, DEFAULT_DIB3000P_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &adap->fe) == 0 || 233 if ((adap->fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000P_I2C_ADDRESS, &mod3000p_dib3000p_config)) == NULL ||
234 dib3000mc_attach(&adap->dev->i2c_adap, 1, DEFAULT_DIB3000MC_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &adap->fe) == 0) { 234 (adap->fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000MC_I2C_ADDRESS, &mod3000p_dib3000p_config)) == NULL) {
235 if (adap->priv != NULL) { 235 if (adap->priv != NULL) {
236 struct dibusb_state *st = adap->priv; 236 struct dibusb_state *st = adap->priv;
237 st->ops.pid_parse = dib3000mc_pid_parse; 237 st->ops.pid_parse = dib3000mc_pid_parse;
@@ -247,10 +247,9 @@ static struct mt2060_config stk3000p_mt2060_config = {
247 0x60 247 0x60
248}; 248};
249 249
250int dibusb_dib3000mc_tuner_attach (struct dvb_usb_adapter *adap) 250int dibusb_dib3000mc_tuner_attach(struct dvb_usb_adapter *adap)
251{ 251{
252 struct dibusb_state *st = adap->priv; 252 struct dibusb_state *st = adap->priv;
253 int ret;
254 u8 a,b; 253 u8 a,b;
255 u16 if1 = 1220; 254 u16 if1 = 1220;
256 struct i2c_adapter *tun_i2c; 255 struct i2c_adapter *tun_i2c;
@@ -287,9 +286,9 @@ int dibusb_dib3000mc_tuner_attach (struct dvb_usb_adapter *adap)
287 } 286 }
288 287
289 tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1); 288 tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1);
290 if ((ret = mt2060_attach(adap->fe, tun_i2c, &stk3000p_mt2060_config, if1)) != 0) { 289 if (dvb_attach(mt2060_attach, adap->fe, tun_i2c, &stk3000p_mt2060_config, if1) != NULL) {
291 /* not found - use panasonic pll parameters */ 290 /* not found - use panasonic pll parameters */
292 if (dvb_pll_attach(adap->fe, 0x60, tun_i2c, &dvb_pll_env57h1xd5) == NULL) 291 if (dvb_attach(dvb_pll_attach, adap->fe, 0x60, tun_i2c, &dvb_pll_env57h1xd5) == NULL)
293 return -ENOMEM; 292 return -ENOMEM;
294 } else { 293 } else {
295 st->mt2060_present = 1; 294 st->mt2060_present = 1;