Commit ee3d440c authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

V4L/DVB: af9015: add support for tda18218 silicon tuner

Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2158e509
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "tda18271.h" #include "tda18271.h"
#include "mxl5005s.h" #include "mxl5005s.h"
#include "mc44s803.h" #include "mc44s803.h"
#include "tda18218.h"
static int dvb_usb_af9015_debug; static int dvb_usb_af9015_debug;
module_param_named(debug, dvb_usb_af9015_debug, int, 0644); module_param_named(debug, dvb_usb_af9015_debug, int, 0644);
...@@ -992,6 +993,7 @@ static int af9015_read_config(struct usb_device *udev) ...@@ -992,6 +993,7 @@ static int af9015_read_config(struct usb_device *udev)
case AF9013_TUNER_MT2060_2: case AF9013_TUNER_MT2060_2:
case AF9013_TUNER_TDA18271: case AF9013_TUNER_TDA18271:
case AF9013_TUNER_QT1010A: case AF9013_TUNER_QT1010A:
case AF9013_TUNER_TDA18218:
af9015_af9013_config[i].rf_spec_inv = 1; af9015_af9013_config[i].rf_spec_inv = 1;
break; break;
case AF9013_TUNER_MXL5003D: case AF9013_TUNER_MXL5003D:
...@@ -1003,9 +1005,6 @@ static int af9015_read_config(struct usb_device *udev) ...@@ -1003,9 +1005,6 @@ static int af9015_read_config(struct usb_device *udev)
af9015_af9013_config[i].gpio[1] = AF9013_GPIO_LO; af9015_af9013_config[i].gpio[1] = AF9013_GPIO_LO;
af9015_af9013_config[i].rf_spec_inv = 1; af9015_af9013_config[i].rf_spec_inv = 1;
break; break;
case AF9013_TUNER_TDA18218:
warn("tuner NXP TDA18218 not supported yet");
return -ENODEV;
default: default:
warn("tuner id:%d not supported, please report!", val); warn("tuner id:%d not supported, please report!", val);
return -ENODEV; return -ENODEV;
...@@ -1208,6 +1207,11 @@ static struct mc44s803_config af9015_mc44s803_config = { ...@@ -1208,6 +1207,11 @@ static struct mc44s803_config af9015_mc44s803_config = {
.dig_out = 1, .dig_out = 1,
}; };
static struct tda18218_config af9015_tda18218_config = {
.i2c_address = 0xc0,
.i2c_wr_max = 21, /* max wr bytes AF9015 I2C adap can handle at once */
};
static int af9015_tuner_attach(struct dvb_usb_adapter *adap) static int af9015_tuner_attach(struct dvb_usb_adapter *adap)
{ {
struct af9015_state *state = adap->dev->priv; struct af9015_state *state = adap->dev->priv;
...@@ -1238,6 +1242,10 @@ static int af9015_tuner_attach(struct dvb_usb_adapter *adap) ...@@ -1238,6 +1242,10 @@ static int af9015_tuner_attach(struct dvb_usb_adapter *adap)
ret = dvb_attach(tda18271_attach, adap->fe, 0xc0, i2c_adap, ret = dvb_attach(tda18271_attach, adap->fe, 0xc0, i2c_adap,
&af9015_tda18271_config) == NULL ? -ENODEV : 0; &af9015_tda18271_config) == NULL ? -ENODEV : 0;
break; break;
case AF9013_TUNER_TDA18218:
ret = dvb_attach(tda18218_attach, adap->fe, i2c_adap,
&af9015_tda18218_config) == NULL ? -ENODEV : 0;
break;
case AF9013_TUNER_MXL5003D: case AF9013_TUNER_MXL5003D:
ret = dvb_attach(mxl5005s_attach, adap->fe, i2c_adap, ret = dvb_attach(mxl5005s_attach, adap->fe, i2c_adap,
&af9015_mxl5003_config) == NULL ? -ENODEV : 0; &af9015_mxl5003_config) == NULL ? -ENODEV : 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment