diff options
author | Antti Palosaari <crope@iki.fi> | 2013-01-07 07:51:13 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-21 17:47:19 -0400 |
commit | ac77fb0f0ce9f77f465692d590b9615b95a99fb2 (patch) | |
tree | 89c92e5bcc7a6bd82b5c013a625b01001dad09e0 | |
parent | 4902bb39b643437a4c0a339dbf8f3ceb14540be5 (diff) |
[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>
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/Kconfig | 1 | ||||
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/af9035.c | 24 | ||||
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/af9035.h | 1 |
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 692224d97d06..2d4abfa75043 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 | |||
41 | select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT | 41 | select MEDIA_TUNER_MXL5007T if MEDIA_SUBDRV_AUTOSELECT |
42 | select MEDIA_TUNER_TDA18218 if MEDIA_SUBDRV_AUTOSELECT | 42 | select MEDIA_TUNER_TDA18218 if MEDIA_SUBDRV_AUTOSELECT |
43 | select MEDIA_TUNER_FC2580 if MEDIA_SUBDRV_AUTOSELECT | 43 | select MEDIA_TUNER_FC2580 if MEDIA_SUBDRV_AUTOSELECT |
44 | select MEDIA_TUNER_IT913X if MEDIA_SUBDRV_AUTOSELECT | ||
44 | help | 45 | help |
45 | Say Y here to support the Afatech AF9035 based DVB USB receiver. | 46 | Say Y here to support the Afatech AF9035 based DVB USB receiver. |
46 | 47 | ||
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index 66f65197c40d..f43e83c4122a 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) | |||
652 | int ret, i; | 652 | int ret, i; |
653 | u8 tmp; | 653 | u8 tmp; |
654 | 654 | ||
655 | /* demod I2C "address" */ | ||
656 | state->af9033_config[0].i2c_addr = 0x38; | ||
657 | state->af9033_config[0].tuner = AF9033_TUNER_IT9135_38; | ||
658 | state->af9033_config[0].adc_multiplier = AF9033_ADC_MULTIPLIER_2X; | ||
655 | state->dual_mode = false; | 659 | state->dual_mode = false; |
656 | 660 | ||
657 | /* get demod clock */ | 661 | /* get demod clock */ |
@@ -920,6 +924,20 @@ static const struct fc0012_config af9035_fc0012_config[] = { | |||
920 | } | 924 | } |
921 | }; | 925 | }; |
922 | 926 | ||
927 | static struct ite_config af9035_it913x_config = { | ||
928 | .chip_ver = 0x01, | ||
929 | .chip_type = 0x9135, | ||
930 | .firmware = 0x00000000, | ||
931 | .firmware_ver = 1, | ||
932 | .adc_x2 = 1, | ||
933 | .tuner_id_0 = AF9033_TUNER_IT9135_38, | ||
934 | .tuner_id_1 = 0x00, | ||
935 | .dual_mode = 0x00, | ||
936 | .adf = 0x00, | ||
937 | /* option to read SIGNAL_LEVEL */ | ||
938 | .read_slevel = 0, | ||
939 | }; | ||
940 | |||
923 | static int af9035_tuner_attach(struct dvb_usb_adapter *adap) | 941 | static int af9035_tuner_attach(struct dvb_usb_adapter *adap) |
924 | { | 942 | { |
925 | struct state *state = adap_to_priv(adap); | 943 | struct state *state = adap_to_priv(adap); |
@@ -1082,6 +1100,11 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap) | |||
1082 | fe = dvb_attach(fc0012_attach, adap->fe[0], &d->i2c_adap, | 1100 | fe = dvb_attach(fc0012_attach, adap->fe[0], &d->i2c_adap, |
1083 | &af9035_fc0012_config[adap->id]); | 1101 | &af9035_fc0012_config[adap->id]); |
1084 | break; | 1102 | break; |
1103 | case AF9033_TUNER_IT9135_38: | ||
1104 | /* attach tuner */ | ||
1105 | fe = dvb_attach(it913x_attach, adap->fe[0], | ||
1106 | &d->i2c_adap, 0x38, &af9035_it913x_config); | ||
1107 | break; | ||
1085 | default: | 1108 | default: |
1086 | fe = NULL; | 1109 | fe = NULL; |
1087 | } | 1110 | } |
@@ -1275,7 +1298,6 @@ static const struct dvb_usb_device_properties it9135_props = { | |||
1275 | .frontend_attach = af9035_frontend_attach, | 1298 | .frontend_attach = af9035_frontend_attach, |
1276 | .tuner_attach = af9035_tuner_attach, | 1299 | .tuner_attach = af9035_tuner_attach, |
1277 | .init = af9035_init, | 1300 | .init = af9035_init, |
1278 | .get_rc_config = af9035_get_rc_config, | ||
1279 | 1301 | ||
1280 | .num_adapters = 1, | 1302 | .num_adapters = 1, |
1281 | .adapter = { | 1303 | .adapter = { |
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.h b/drivers/media/usb/dvb-usb-v2/af9035.h index 6d098a93d5ab..1b2f69f594f3 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.h +++ b/drivers/media/usb/dvb-usb-v2/af9035.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include "mxl5007t.h" | 30 | #include "mxl5007t.h" |
31 | #include "tda18218.h" | 31 | #include "tda18218.h" |
32 | #include "fc2580.h" | 32 | #include "fc2580.h" |
33 | #include "it913x.h" | ||
33 | 34 | ||
34 | struct reg_val { | 35 | struct reg_val { |
35 | u32 reg; | 36 | u32 reg; |