aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/cxusb.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2006-04-18 16:47:08 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 00:58:29 -0400
commit55bbcdefc525236bd6ed691456923322be4a82c7 (patch)
tree82fc5c2412ea8e5af585d4b76aed94285b168366 /drivers/media/dvb/dvb-usb/cxusb.c
parent7e557743360104cf71aab1f34df58ef5e7d0b042 (diff)
V4L/DVB (3843): Cxusb: use fe_lgh06xf.h
- removed duplicated tuning code for LG TDVS H064F Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/cxusb.c')
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index 4b232a7ec5e6..a99fada4274e 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -27,6 +27,7 @@
27 27
28#include "cx22702.h" 28#include "cx22702.h"
29#include "lgdt330x.h" 29#include "lgdt330x.h"
30#include "fe_lgh06xf.h"
30#include "mt352.h" 31#include "mt352.h"
31#include "mt352_priv.h" 32#include "mt352_priv.h"
32 33
@@ -326,30 +327,7 @@ static int cxusb_lgh064f_pll_set_i2c(struct dvb_frontend *fe,
326 struct dvb_frontend_parameters *fep) 327 struct dvb_frontend_parameters *fep)
327{ 328{
328 struct dvb_usb_device *d = fe->dvb->priv; 329 struct dvb_usb_device *d = fe->dvb->priv;
329 int ret = 0; 330 return lg_h06xf_pll_set(fe, &d->i2c_adap, fep);
330 u8 b[5];
331 struct i2c_msg msg = { .addr = d->pll_addr, .flags = 0,
332 .buf = &b[1], .len = 4 };
333
334 dvb_usb_pll_set(fe,fep,b);
335
336 if (i2c_transfer (&d->i2c_adap, &msg, 1) != 1) {
337 err("tuner i2c write failed for pll_set.");
338 ret = -EREMOTEIO;
339 }
340 msleep(1);
341
342 /* Set the Auxiliary Byte. */
343 b[3] &= ~0x20;
344 b[3] |= 0x18;
345 b[4] = 0x50;
346 if (i2c_transfer(&d->i2c_adap, &msg, 1) != 1) {
347 err("tuner i2c write failed writing auxiliary byte.");
348 ret = -EREMOTEIO;
349 }
350 msleep(1);
351
352 return ret;
353} 331}
354 332
355static struct cx22702_config cxusb_cx22702_config = { 333static struct cx22702_config cxusb_cx22702_config = {
@@ -390,13 +368,6 @@ static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_device *d)
390 return 0; 368 return 0;
391} 369}
392 370
393static int cxusb_lgh064f_tuner_attach(struct dvb_usb_device *d)
394{
395 d->pll_addr = 0x61;
396 d->pll_desc = &dvb_pll_tdvs_tua6034;
397 return 0;
398}
399
400static int cxusb_dee1601_tuner_attach(struct dvb_usb_device *d) 371static int cxusb_dee1601_tuner_attach(struct dvb_usb_device *d)
401{ 372{
402 d->pll_addr = 0x61; 373 d->pll_addr = 0x61;
@@ -581,7 +552,6 @@ static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties = {
581 .streaming_ctrl = cxusb_streaming_ctrl, 552 .streaming_ctrl = cxusb_streaming_ctrl,
582 .power_ctrl = cxusb_bluebird_power_ctrl, 553 .power_ctrl = cxusb_bluebird_power_ctrl,
583 .frontend_attach = cxusb_lgdt3303_frontend_attach, 554 .frontend_attach = cxusb_lgdt3303_frontend_attach,
584 .tuner_attach = cxusb_lgh064f_tuner_attach,
585 555
586 .i2c_algo = &cxusb_i2c_algo, 556 .i2c_algo = &cxusb_i2c_algo,
587 557