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

[media] dvbsky: switch ts2022 to ts2020 driver

Change ts2022 driver to ts2020 driver. ts2020 driver supports
both tuner chip models.

Cc: Nibble Max <nibble.max@gmail.com>
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 2ad8dd41
...@@ -146,7 +146,7 @@ config DVB_USB_DVBSKY ...@@ -146,7 +146,7 @@ config DVB_USB_DVBSKY
depends on DVB_USB_V2 depends on DVB_USB_V2
select DVB_M88DS3103 if MEDIA_SUBDRV_AUTOSELECT select DVB_M88DS3103 if MEDIA_SUBDRV_AUTOSELECT
select DVB_SI2168 if MEDIA_SUBDRV_AUTOSELECT select DVB_SI2168 if MEDIA_SUBDRV_AUTOSELECT
select MEDIA_TUNER_M88TS2022 if MEDIA_SUBDRV_AUTOSELECT select DVB_TS2020 if MEDIA_SUBDRV_AUTOSELECT
select MEDIA_TUNER_SI2157 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_SI2157 if MEDIA_SUBDRV_AUTOSELECT
select DVB_SP2 if MEDIA_SUBDRV_AUTOSELECT select DVB_SP2 if MEDIA_SUBDRV_AUTOSELECT
help help
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "dvb_usb.h" #include "dvb_usb.h"
#include "m88ds3103.h" #include "m88ds3103.h"
#include "m88ts2022.h" #include "ts2020.h"
#include "sp2.h" #include "sp2.h"
#include "si2168.h" #include "si2168.h"
#include "si2157.h" #include "si2157.h"
...@@ -315,9 +315,7 @@ static int dvbsky_s960_attach(struct dvb_usb_adapter *adap) ...@@ -315,9 +315,7 @@ static int dvbsky_s960_attach(struct dvb_usb_adapter *adap)
struct i2c_adapter *i2c_adapter; struct i2c_adapter *i2c_adapter;
struct i2c_client *client; struct i2c_client *client;
struct i2c_board_info info; struct i2c_board_info info;
struct m88ts2022_config m88ts2022_config = { struct ts2020_config ts2020_config = {};
.clock = 27000000,
};
memset(&info, 0, sizeof(struct i2c_board_info)); memset(&info, 0, sizeof(struct i2c_board_info));
/* attach demod */ /* attach demod */
...@@ -332,11 +330,11 @@ static int dvbsky_s960_attach(struct dvb_usb_adapter *adap) ...@@ -332,11 +330,11 @@ static int dvbsky_s960_attach(struct dvb_usb_adapter *adap)
} }
/* attach tuner */ /* attach tuner */
m88ts2022_config.fe = adap->fe[0]; ts2020_config.fe = adap->fe[0];
strlcpy(info.type, "m88ts2022", I2C_NAME_SIZE); strlcpy(info.type, "ts2020", I2C_NAME_SIZE);
info.addr = 0x60; info.addr = 0x60;
info.platform_data = &m88ts2022_config; info.platform_data = &ts2020_config;
request_module("m88ts2022"); request_module("ts2020");
client = i2c_new_device(i2c_adapter, &info); client = i2c_new_device(i2c_adapter, &info);
if (client == NULL || client->dev.driver == NULL) { if (client == NULL || client->dev.driver == NULL) {
dvb_frontend_detach(adap->fe[0]); dvb_frontend_detach(adap->fe[0]);
...@@ -439,9 +437,7 @@ static int dvbsky_s960c_attach(struct dvb_usb_adapter *adap) ...@@ -439,9 +437,7 @@ static int dvbsky_s960c_attach(struct dvb_usb_adapter *adap)
struct i2c_client *client_tuner, *client_ci; struct i2c_client *client_tuner, *client_ci;
struct i2c_board_info info; struct i2c_board_info info;
struct sp2_config sp2_config; struct sp2_config sp2_config;
struct m88ts2022_config m88ts2022_config = { struct ts2020_config ts2020_config = {};
.clock = 27000000,
};
memset(&info, 0, sizeof(struct i2c_board_info)); memset(&info, 0, sizeof(struct i2c_board_info));
/* attach demod */ /* attach demod */
...@@ -456,11 +452,11 @@ static int dvbsky_s960c_attach(struct dvb_usb_adapter *adap) ...@@ -456,11 +452,11 @@ static int dvbsky_s960c_attach(struct dvb_usb_adapter *adap)
} }
/* attach tuner */ /* attach tuner */
m88ts2022_config.fe = adap->fe[0]; ts2020_config.fe = adap->fe[0];
strlcpy(info.type, "m88ts2022", I2C_NAME_SIZE); strlcpy(info.type, "ts2020", I2C_NAME_SIZE);
info.addr = 0x60; info.addr = 0x60;
info.platform_data = &m88ts2022_config; info.platform_data = &ts2020_config;
request_module("m88ts2022"); request_module("ts2020");
client_tuner = i2c_new_device(i2c_adapter, &info); client_tuner = i2c_new_device(i2c_adapter, &info);
if (client_tuner == NULL || client_tuner->dev.driver == NULL) { if (client_tuner == NULL || client_tuner->dev.driver == NULL) {
ret = -ENODEV; ret = -ENODEV;
......
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