summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2013-01-07 12:51:13 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-21 21:47:19 (GMT)
commitac77fb0f0ce9f77f465692d590b9615b95a99fb2 (patch)
tree89c92e5bcc7a6bd82b5c013a625b01001dad09e0 /drivers/media
parent4902bb39b643437a4c0a339dbf8f3ceb14540be5 (diff)
downloadlinux-fsl-qoriq-ac77fb0f0ce9f77f465692d590b9615b95a99fb2.tar.xz
[media] af9035: add support for 1st gen it9135
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/dvb-usb-v2/Kconfig1
-rw-r--r--drivers/media/usb/dvb-usb-v2/af9035.c24
-rw-r--r--drivers/media/usb/dvb-usb-v2/af9035.h1
3 files changed, 25 insertions, 1 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/Kconfig b/drivers/media/usb/dvb-usb-v2/Kconfig
index 692224d..2d4abfa 100644
--- a/drivers/media/usb/dvb-usb-v2/Kconfig
+++ b/drivers/media/usb/dvb-usb-v2/Kconfig
@@ -41,6 +41,7 @@ config DVB_USB_AF9035
select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT
select MEDIA_TUNER_TDA18218 if MEDIA_SUBDRV_AUTOSELECT
select MEDIA_TUNER_FC2580 if MEDIA_SUBDRV_AUTOSELECT
+ select MEDIA_TUNER_IT913X if MEDIA_SUBDRV_AUTOSELECT
help
Say Y here to support the Afatech AF9035 based DVB USB receiver.
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c
index 66f6519..f43e83c 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.c
+++ b/drivers/media/usb/dvb-usb-v2/af9035.c
@@ -652,6 +652,10 @@ static int af9035_read_config_it9135(struct dvb_usb_device *d)
int ret, i;
u8 tmp;
+ /* demod I2C "address" */
+ state->af9033_config[0].i2c_addr = 0x38;
+ state->af9033_config[0].tuner = AF9033_TUNER_IT9135_38;
+ state->af9033_config[0].adc_multiplier = AF9033_ADC_MULTIPLIER_2X;
state->dual_mode = false;
/* get demod clock */
@@ -920,6 +924,20 @@ static const struct fc0012_config af9035_fc0012_config[] = {
}
};
+static struct ite_config af9035_it913x_config = {
+ .chip_ver = 0x01,
+ .chip_type = 0x9135,
+ .firmware = 0x00000000,
+ .firmware_ver = 1,
+ .adc_x2 = 1,
+ .tuner_id_0 = AF9033_TUNER_IT9135_38,
+ .tuner_id_1 = 0x00,
+ .dual_mode = 0x00,
+ .adf = 0x00,
+ /* option to read SIGNAL_LEVEL */
+ .read_slevel = 0,
+};
+
static int af9035_tuner_attach(struct dvb_usb_adapter *adap)
{
struct state *state = adap_to_priv(adap);
@@ -1082,6 +1100,11 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap)
fe = dvb_attach(fc0012_attach, adap->fe[0], &d->i2c_adap,
&af9035_fc0012_config[adap->id]);
break;
+ case AF9033_TUNER_IT9135_38:
+ /* attach tuner */
+ fe = dvb_attach(it913x_attach, adap->fe[0],
+ &d->i2c_adap, 0x38, &af9035_it913x_config);
+ break;
default:
fe = NULL;
}
@@ -1275,7 +1298,6 @@ static const struct dvb_usb_device_properties it9135_props = {
.frontend_attach = af9035_frontend_attach,
.tuner_attach = af9035_tuner_attach,
.init = af9035_init,
- .get_rc_config = af9035_get_rc_config,
.num_adapters = 1,
.adapter = {
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.h b/drivers/media/usb/dvb-usb-v2/af9035.h
index 6d098a9..1b2f69f 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.h
+++ b/drivers/media/usb/dvb-usb-v2/af9035.h
@@ -30,6 +30,7 @@
#include "mxl5007t.h"
#include "tda18218.h"
#include "fc2580.h"
+#include "it913x.h"
struct reg_val {
u32 reg;