aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2012-09-08 22:07:25 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-23 17:12:54 -0300
commit384df49a6a97d411af33da3237558411789b67c5 (patch)
treee565c96fbe065717b5ca2c1ffcc2506c14957469 /drivers/media/usb/dvb-usb-v2/rtl28xxu.c
parentd9cb41afbf2aab54133c804009a1b8e76cedaef3 (diff)
downloadvexpress-lsk-384df49a6a97d411af33da3237558411789b67c5.tar.gz
[media] rtl28xxu: add support for FCI FC2580 silicon tuner driver
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb-v2/rtl28xxu.c')
-rw-r--r--drivers/media/usb/dvb-usb-v2/rtl28xxu.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index d0d23f2c1fe..f195b778794 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -31,6 +31,7 @@
#include "fc0012.h"
#include "fc0013.h"
#include "e4000.h"
+#include "fc2580.h"
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
@@ -576,10 +577,11 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap)
ret = rtl28xxu_ctrl_msg(d, &req_fc2580);
if (ret == 0 && buf[0] == 0x56) {
priv->tuner = TUNER_RTL2832_FC2580;
- /* TODO implement tuner */
+ /* FIXME: do not abuse fc0012 settings */
+ rtl2832_config = &rtl28xxu_rtl2832_fc0012_config;
dev_info(&d->udev->dev, "%s: FC2580 tuner found",
KBUILD_MODNAME);
- goto unsupported;
+ goto found;
}
/* check MT2063 ID register; reg=00 val=9e || 9c */
@@ -753,6 +755,11 @@ static const struct e4000_config rtl2832u_e4000_config = {
.clock = 28800000,
};
+static const struct fc2580_config rtl2832u_fc2580_config = {
+ .i2c_addr = 0x56,
+ .clock = 16384000,
+};
+
static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap)
{
int ret;
@@ -785,6 +792,10 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap)
fe = dvb_attach(e4000_attach, adap->fe[0], &d->i2c_adap,
&rtl2832u_e4000_config);
break;
+ case TUNER_RTL2832_FC2580:
+ fe = dvb_attach(fc2580_attach, adap->fe[0], &d->i2c_adap,
+ &rtl2832u_fc2580_config);
+ break;
default:
fe = NULL;
dev_err(&d->udev->dev, "%s: unknown tuner=%d\n", KBUILD_MODNAME,