diff options
author | Jochen Friedrich <jochen@scram.de> | 2009-02-02 12:59:50 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:42:39 -0400 |
commit | d563399859bcc984aa2df38df62851163b1690b3 (patch) | |
tree | 318bd25d70e3f414b967b7dc26c3aab42a55bea3 /drivers/media/dvb/dvb-usb | |
parent | b72dbaefbdcdfc9b69fc3861b9de0a6240f5cc8a (diff) |
V4L/DVB (10453): af9015: add MC44S803 support
Add MC44S803 support to AF9015 driver.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/Kconfig | 1 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/af9015.c | 40 |
2 files changed, 28 insertions, 13 deletions
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 49f7b20c25d6..bbddc9fb6b64 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig | |||
@@ -297,5 +297,6 @@ config DVB_USB_AF9015 | |||
297 | select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE | 297 | select MEDIA_TUNER_QT1010 if !MEDIA_TUNER_CUSTOMIZE |
298 | select MEDIA_TUNER_TDA18271 if !MEDIA_TUNER_CUSTOMIZE | 298 | select MEDIA_TUNER_TDA18271 if !MEDIA_TUNER_CUSTOMIZE |
299 | select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMIZE | 299 | select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMIZE |
300 | select MEDIA_TUNER_MC44S803 if !MEDIA_TUNER_CUSTOMISE | ||
300 | help | 301 | help |
301 | Say Y here to support the Afatech AF9015 based DVB-T USB2.0 receiver | 302 | Say Y here to support the Afatech AF9015 based DVB-T USB2.0 receiver |
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index c6b23998adda..f0ba8b07b84f 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c | |||
@@ -27,9 +27,7 @@ | |||
27 | #include "qt1010.h" | 27 | #include "qt1010.h" |
28 | #include "tda18271.h" | 28 | #include "tda18271.h" |
29 | #include "mxl5005s.h" | 29 | #include "mxl5005s.h" |
30 | #if 0 | 30 | #include "mc44s803.h" |
31 | #include "mc44s80x.h" | ||
32 | #endif | ||
33 | 31 | ||
34 | static int dvb_usb_af9015_debug; | 32 | static int dvb_usb_af9015_debug; |
35 | module_param_named(debug, dvb_usb_af9015_debug, int, 0644); | 33 | module_param_named(debug, dvb_usb_af9015_debug, int, 0644); |
@@ -280,6 +278,21 @@ Due to that the only way to select correct tuner is use demodulator I2C-gate. | |||
280 | req.data = &msg[i+1].buf[0]; | 278 | req.data = &msg[i+1].buf[0]; |
281 | ret = af9015_ctrl_msg(d, &req); | 279 | ret = af9015_ctrl_msg(d, &req); |
282 | i += 2; | 280 | i += 2; |
281 | } else if (msg[i].flags & I2C_M_RD) { | ||
282 | ret = -EINVAL; | ||
283 | if (msg[i].addr == | ||
284 | af9015_af9013_config[0].demod_address) | ||
285 | goto error; | ||
286 | else | ||
287 | req.cmd = READ_I2C; | ||
288 | req.i2c_addr = msg[i].addr; | ||
289 | req.addr = addr; | ||
290 | req.mbox = mbox; | ||
291 | req.addr_len = addr_len; | ||
292 | req.data_len = msg[i].len; | ||
293 | req.data = &msg[i].buf[0]; | ||
294 | ret = af9015_ctrl_msg(d, &req); | ||
295 | i += 1; | ||
283 | } else { | 296 | } else { |
284 | if (msg[i].addr == | 297 | if (msg[i].addr == |
285 | af9015_af9013_config[0].demod_address) | 298 | af9015_af9013_config[0].demod_address) |
@@ -939,7 +952,6 @@ static int af9015_read_config(struct usb_device *udev) | |||
939 | switch (val) { | 952 | switch (val) { |
940 | case AF9013_TUNER_ENV77H11D5: | 953 | case AF9013_TUNER_ENV77H11D5: |
941 | case AF9013_TUNER_MT2060: | 954 | case AF9013_TUNER_MT2060: |
942 | case AF9013_TUNER_MC44S803: | ||
943 | case AF9013_TUNER_QT1010: | 955 | case AF9013_TUNER_QT1010: |
944 | case AF9013_TUNER_UNKNOWN: | 956 | case AF9013_TUNER_UNKNOWN: |
945 | case AF9013_TUNER_MT2060_2: | 957 | case AF9013_TUNER_MT2060_2: |
@@ -952,6 +964,10 @@ static int af9015_read_config(struct usb_device *udev) | |||
952 | case AF9013_TUNER_MXL5005R: | 964 | case AF9013_TUNER_MXL5005R: |
953 | af9015_af9013_config[i].rf_spec_inv = 0; | 965 | af9015_af9013_config[i].rf_spec_inv = 0; |
954 | break; | 966 | break; |
967 | case AF9013_TUNER_MC44S803: | ||
968 | af9015_af9013_config[i].gpio[1] = AF9013_GPIO_LO; | ||
969 | af9015_af9013_config[i].rf_spec_inv = 1; | ||
970 | break; | ||
955 | default: | 971 | default: |
956 | warn("tuner id:%d not supported, please report!", val); | 972 | warn("tuner id:%d not supported, please report!", val); |
957 | return -ENODEV; | 973 | return -ENODEV; |
@@ -1139,6 +1155,11 @@ static struct mxl5005s_config af9015_mxl5005_config = { | |||
1139 | .AgcMasterByte = 0x00, | 1155 | .AgcMasterByte = 0x00, |
1140 | }; | 1156 | }; |
1141 | 1157 | ||
1158 | static struct mc44s803_config af9015_mc44s803_config = { | ||
1159 | .i2c_address = 0xc0, | ||
1160 | .dig_out = 1, | ||
1161 | }; | ||
1162 | |||
1142 | static int af9015_tuner_attach(struct dvb_usb_adapter *adap) | 1163 | static int af9015_tuner_attach(struct dvb_usb_adapter *adap) |
1143 | { | 1164 | { |
1144 | struct af9015_state *state = adap->dev->priv; | 1165 | struct af9015_state *state = adap->dev->priv; |
@@ -1183,15 +1204,8 @@ static int af9015_tuner_attach(struct dvb_usb_adapter *adap) | |||
1183 | DVB_PLL_TDA665X) == NULL ? -ENODEV : 0; | 1204 | DVB_PLL_TDA665X) == NULL ? -ENODEV : 0; |
1184 | break; | 1205 | break; |
1185 | case AF9013_TUNER_MC44S803: | 1206 | case AF9013_TUNER_MC44S803: |
1186 | #if 0 | 1207 | ret = dvb_attach(mc44s803_attach, adap->fe, i2c_adap, |
1187 | ret = dvb_attach(mc44s80x_attach, adap->fe, i2c_adap) | 1208 | &af9015_mc44s803_config) == NULL ? -ENODEV : 0; |
1188 | == NULL ? -ENODEV : 0; | ||
1189 | #else | ||
1190 | ret = -ENODEV; | ||
1191 | info("Freescale MC44S803 tuner found but no driver for that" \ | ||
1192 | "tuner. Look at the Linuxtv.org for tuner driver" \ | ||
1193 | "status."); | ||
1194 | #endif | ||
1195 | break; | 1209 | break; |
1196 | case AF9013_TUNER_UNKNOWN: | 1210 | case AF9013_TUNER_UNKNOWN: |
1197 | default: | 1211 | default: |