diff options
Diffstat (limited to 'drivers/media/dvb/frontends/ds3000.c')
-rw-r--r-- | drivers/media/dvb/frontends/ds3000.c | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c index 90bf573308b0..938777065de6 100644 --- a/drivers/media/dvb/frontends/ds3000.c +++ b/drivers/media/dvb/frontends/ds3000.c | |||
@@ -934,20 +934,6 @@ error2: | |||
934 | } | 934 | } |
935 | EXPORT_SYMBOL(ds3000_attach); | 935 | EXPORT_SYMBOL(ds3000_attach); |
936 | 936 | ||
937 | static int ds3000_set_property(struct dvb_frontend *fe, | ||
938 | struct dtv_property *tvp) | ||
939 | { | ||
940 | dprintk("%s(..)\n", __func__); | ||
941 | return 0; | ||
942 | } | ||
943 | |||
944 | static int ds3000_get_property(struct dvb_frontend *fe, | ||
945 | struct dtv_property *tvp) | ||
946 | { | ||
947 | dprintk("%s(..)\n", __func__); | ||
948 | return 0; | ||
949 | } | ||
950 | |||
951 | static int ds3000_set_carrier_offset(struct dvb_frontend *fe, | 937 | static int ds3000_set_carrier_offset(struct dvb_frontend *fe, |
952 | s32 carrier_offset_khz) | 938 | s32 carrier_offset_khz) |
953 | { | 939 | { |
@@ -967,8 +953,7 @@ static int ds3000_set_carrier_offset(struct dvb_frontend *fe, | |||
967 | return 0; | 953 | return 0; |
968 | } | 954 | } |
969 | 955 | ||
970 | static int ds3000_set_frontend(struct dvb_frontend *fe, | 956 | static int ds3000_set_frontend(struct dvb_frontend *fe) |
971 | struct dvb_frontend_parameters *p) | ||
972 | { | 957 | { |
973 | struct ds3000_state *state = fe->demodulator_priv; | 958 | struct ds3000_state *state = fe->demodulator_priv; |
974 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; | 959 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; |
@@ -994,15 +979,15 @@ static int ds3000_set_frontend(struct dvb_frontend *fe, | |||
994 | div4 = 0; | 979 | div4 = 0; |
995 | 980 | ||
996 | /* calculate and set freq divider */ | 981 | /* calculate and set freq divider */ |
997 | if (p->frequency < 1146000) { | 982 | if (c->frequency < 1146000) { |
998 | ds3000_tuner_writereg(state, 0x10, 0x11); | 983 | ds3000_tuner_writereg(state, 0x10, 0x11); |
999 | div4 = 1; | 984 | div4 = 1; |
1000 | ndiv = ((p->frequency * (6 + 8) * 4) + | 985 | ndiv = ((c->frequency * (6 + 8) * 4) + |
1001 | (DS3000_XTAL_FREQ / 2)) / | 986 | (DS3000_XTAL_FREQ / 2)) / |
1002 | DS3000_XTAL_FREQ - 1024; | 987 | DS3000_XTAL_FREQ - 1024; |
1003 | } else { | 988 | } else { |
1004 | ds3000_tuner_writereg(state, 0x10, 0x01); | 989 | ds3000_tuner_writereg(state, 0x10, 0x01); |
1005 | ndiv = ((p->frequency * (6 + 8) * 2) + | 990 | ndiv = ((c->frequency * (6 + 8) * 2) + |
1006 | (DS3000_XTAL_FREQ / 2)) / | 991 | (DS3000_XTAL_FREQ / 2)) / |
1007 | DS3000_XTAL_FREQ - 1024; | 992 | DS3000_XTAL_FREQ - 1024; |
1008 | } | 993 | } |
@@ -1101,7 +1086,7 @@ static int ds3000_set_frontend(struct dvb_frontend *fe, | |||
1101 | msleep(60); | 1086 | msleep(60); |
1102 | 1087 | ||
1103 | offset_khz = (ndiv - ndiv % 2 + 1024) * DS3000_XTAL_FREQ | 1088 | offset_khz = (ndiv - ndiv % 2 + 1024) * DS3000_XTAL_FREQ |
1104 | / (6 + 8) / (div4 + 1) / 2 - p->frequency; | 1089 | / (6 + 8) / (div4 + 1) / 2 - c->frequency; |
1105 | 1090 | ||
1106 | /* ds3000 global reset */ | 1091 | /* ds3000 global reset */ |
1107 | ds3000_writereg(state, 0x07, 0x80); | 1092 | ds3000_writereg(state, 0x07, 0x80); |
@@ -1220,13 +1205,13 @@ static int ds3000_set_frontend(struct dvb_frontend *fe, | |||
1220 | } | 1205 | } |
1221 | 1206 | ||
1222 | static int ds3000_tune(struct dvb_frontend *fe, | 1207 | static int ds3000_tune(struct dvb_frontend *fe, |
1223 | struct dvb_frontend_parameters *p, | 1208 | bool re_tune, |
1224 | unsigned int mode_flags, | 1209 | unsigned int mode_flags, |
1225 | unsigned int *delay, | 1210 | unsigned int *delay, |
1226 | fe_status_t *status) | 1211 | fe_status_t *status) |
1227 | { | 1212 | { |
1228 | if (p) { | 1213 | if (re_tune) { |
1229 | int ret = ds3000_set_frontend(fe, p); | 1214 | int ret = ds3000_set_frontend(fe); |
1230 | if (ret) | 1215 | if (ret) |
1231 | return ret; | 1216 | return ret; |
1232 | } | 1217 | } |
@@ -1279,10 +1264,9 @@ static int ds3000_sleep(struct dvb_frontend *fe) | |||
1279 | } | 1264 | } |
1280 | 1265 | ||
1281 | static struct dvb_frontend_ops ds3000_ops = { | 1266 | static struct dvb_frontend_ops ds3000_ops = { |
1282 | 1267 | .delsys = { SYS_DVBS, SYS_DVBS2}, | |
1283 | .info = { | 1268 | .info = { |
1284 | .name = "Montage Technology DS3000/TS2020", | 1269 | .name = "Montage Technology DS3000/TS2020", |
1285 | .type = FE_QPSK, | ||
1286 | .frequency_min = 950000, | 1270 | .frequency_min = 950000, |
1287 | .frequency_max = 2150000, | 1271 | .frequency_max = 2150000, |
1288 | .frequency_stepsize = 1011, /* kHz for QPSK frontends */ | 1272 | .frequency_stepsize = 1011, /* kHz for QPSK frontends */ |
@@ -1312,8 +1296,6 @@ static struct dvb_frontend_ops ds3000_ops = { | |||
1312 | .diseqc_send_burst = ds3000_diseqc_send_burst, | 1296 | .diseqc_send_burst = ds3000_diseqc_send_burst, |
1313 | .get_frontend_algo = ds3000_get_algo, | 1297 | .get_frontend_algo = ds3000_get_algo, |
1314 | 1298 | ||
1315 | .set_property = ds3000_set_property, | ||
1316 | .get_property = ds3000_get_property, | ||
1317 | .set_frontend = ds3000_set_frontend, | 1299 | .set_frontend = ds3000_set_frontend, |
1318 | .tune = ds3000_tune, | 1300 | .tune = ds3000_tune, |
1319 | }; | 1301 | }; |