Lines Matching +full:- +full:30

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 Fujitsu MB86A16 DVB-S/DSS DC Receiver driver
59 #define TRACE_IN dprintk(verbose, MB86A16_DEBUG, 1, "-->()")
60 #define TRACE_OUT dprintk(verbose, MB86A16_DEBUG, 1, "()-->")
68 .addr = state->config->demod_address, in mb86a16_write()
76 state->config->demod_address, buf[0], buf[1]); in mb86a16_write()
78 ret = i2c_transfer(state->i2c_adap, &msg, 1); in mb86a16_write()
80 return (ret != 1) ? -EREMOTEIO : 0; in mb86a16_write()
91 .addr = state->config->demod_address, in mb86a16_read()
96 .addr = state->config->demod_address, in mb86a16_read()
102 ret = i2c_transfer(state->i2c_adap, msg, 2); in mb86a16_read()
109 return -EREMOTEIO; in mb86a16_read()
131 return -EREMOTEIO; in CNTM_set()
140 m = 1 << state->deci; in smrt_set()
141 tmp = (8192 * state->master_clk - 2 * m * rate * 8192 + state->master_clk / 2) / state->master_clk; in smrt_set()
146 if (mb86a16_write(state, MB86A16_SRATE1, (state->deci << 2) | in smrt_set()
147 (state->csel << 1) | in smrt_set()
148 state->rsel) < 0) in smrt_set()
158 return -1; in smrt_set()
169 return -EREMOTEIO; in srst()
186 return -1; in afcex_data_set()
201 return -EREMOTEIO; in afcofs_data_set()
214 return -EREMOTEIO; in stlp_set()
227 return -EREMOTEIO; in Vi_set()
269 return -EREMOTEIO; in initial_set()
282 return -EREMOTEIO; in S01T_set()
299 return -EREMOTEIO; in EN_set()
324 return -EREMOTEIO; in AFCEXEN_set()
338 return -EREMOTEIO; in DAGC_data_set()
344 state->deci = 0; state->csel = 0; state->rsel = 0; in smrt_info_get()
346 state->deci = 0; state->csel = 0; state->rsel = 1; in smrt_info_get()
348 state->deci = 0; state->csel = 1; state->rsel = 0; in smrt_info_get()
350 state->deci = 0; state->csel = 1; state->rsel = 1; in smrt_info_get()
352 state->deci = 1; state->csel = 0; state->rsel = 0; in smrt_info_get()
354 state->deci = 1; state->csel = 0; state->rsel = 1; in smrt_info_get()
356 state->deci = 1; state->csel = 1; state->rsel = 0; in smrt_info_get()
358 state->deci = 1; state->csel = 1; state->rsel = 1; in smrt_info_get()
360 state->deci = 2; state->csel = 0; state->rsel = 0; in smrt_info_get()
362 state->deci = 2; state->csel = 0; state->rsel = 1; in smrt_info_get()
364 state->deci = 2; state->csel = 1; state->rsel = 0; in smrt_info_get()
366 state->deci = 2; state->csel = 1; state->rsel = 1; in smrt_info_get()
368 state->deci = 3; state->csel = 0; state->rsel = 0; in smrt_info_get()
370 state->deci = 3; state->csel = 0; state->rsel = 1; in smrt_info_get()
372 state->deci = 3; state->csel = 1; state->rsel = 0; in smrt_info_get()
374 state->deci = 3; state->csel = 1; state->rsel = 1; in smrt_info_get()
376 state->deci = 4; state->csel = 0; state->rsel = 0; in smrt_info_get()
378 state->deci = 4; state->csel = 0; state->rsel = 1; in smrt_info_get()
380 state->deci = 4; state->csel = 1; state->rsel = 0; in smrt_info_get()
382 state->deci = 4; state->csel = 1; state->rsel = 1; in smrt_info_get()
384 state->deci = 5; state->csel = 0; state->rsel = 0; in smrt_info_get()
386 state->deci = 5; state->csel = 0; state->rsel = 1; in smrt_info_get()
388 state->deci = 5; state->csel = 1; state->rsel = 0; in smrt_info_get()
390 state->deci = 5; state->csel = 1; state->rsel = 1; in smrt_info_get()
393 if (state->csel == 0) in smrt_info_get()
394 state->master_clk = 92000; in smrt_info_get()
396 state->master_clk = 61333; in smrt_info_get()
412 return -1; in signal_det()
417 return -1; in signal_det()
433 return -EREMOTEIO; in signal_det()
445 return -1; in signal_det()
459 int ack = -1; in rf_val_set()
519 dprintk(verbose, MB86A16_ERROR, 1, "RF Setup - I2C transfer error"); in rf_val_set()
520 return -EREMOTEIO; in rf_val_set()
540 afcm = AFCM - 4096; in afcerr_chk()
543 afcerr = afcm * state->master_clk / 8192; in afcerr_chk()
549 return -EREMOTEIO; in afcerr_chk()
568 return -EREMOTEIO; in dagcm_val_get()
574 struct mb86a16_state *state = fe->demodulator_priv; in mb86a16_read_status()
605 return -EREMOTEIO; in mb86a16_read_status()
625 return -EREMOTEIO; in sync_chk()
646 crm = CRM - 256; in freqerr_chk()
676 afcm = AFCM - 512; in freqerr_chk()
680 afcerr = afcm * state->master_clk / 8192; in freqerr_chk()
698 fOSC_OFS = fOSC - fTP; in freqerr_chk()
704 frqerr = (crrerr + afcerr + fOSC_OFS * 1000 - 500) / 1000; in freqerr_chk()
712 return -EREMOTEIO; in freqerr_chk()
748 *afcex_freq = *fOSC * 1000 - crnt_swp_freq; in swp_info_get()
750 *afcex_freq = crnt_swp_freq - *fOSC * 1000; in swp_info_get()
752 AFCEX = *afcex_freq * 8192 / state->master_clk; in swp_info_get()
765 if ((v - 1 == vmin) && in swp_freq_calcuation()
766 (*(V + 30 + v) >= 0) && in swp_freq_calcuation()
767 (*(V + 30 + v - 1) >= 0) && in swp_freq_calcuation()
768 (*(V + 30 + v - 1) > *(V + 30 + v)) && in swp_freq_calcuation()
769 (*(V + 30 + v - 1) > SIGMIN)) { in swp_freq_calcuation()
771 swp_freq = fOSC * 1000 + afcex_freq - swp_ofs; in swp_freq_calcuation()
772 *SIG1 = *(V + 30 + v - 1); in swp_freq_calcuation()
774 (*(V + 30 + v) >= 0) && in swp_freq_calcuation()
775 (*(V + 30 + v - 1) >= 0) && in swp_freq_calcuation()
776 (*(V + 30 + v) > *(V + 30 + v - 1)) && in swp_freq_calcuation()
777 (*(V + 30 + v) > SIGMIN)) { in swp_freq_calcuation()
780 *SIG1 = *(V + 30 + v); in swp_freq_calcuation()
781 } else if ((*(V + 30 + v) > 0) && in swp_freq_calcuation()
782 (*(V + 30 + v - 1) > 0) && in swp_freq_calcuation()
783 (*(V + 30 + v - 2) > 0) && in swp_freq_calcuation()
784 (*(V + 30 + v - 3) > 0) && in swp_freq_calcuation()
785 (*(V + 30 + v - 1) > *(V + 30 + v)) && in swp_freq_calcuation()
786 (*(V + 30 + v - 2) > *(V + 30 + v - 3)) && in swp_freq_calcuation()
787 ((*(V + 30 + v - 1) > SIGMIN) || in swp_freq_calcuation()
788 (*(V + 30 + v - 2) > SIGMIN))) { in swp_freq_calcuation()
790 if (*(V + 30 + v - 1) >= *(V + 30 + v - 2)) { in swp_freq_calcuation()
791 swp_freq = fOSC * 1000 + afcex_freq - swp_ofs; in swp_freq_calcuation()
792 *SIG1 = *(V + 30 + v - 1); in swp_freq_calcuation()
794 swp_freq = fOSC * 1000 + afcex_freq - swp_ofs * 2; in swp_freq_calcuation()
795 *SIG1 = *(V + 30 + v - 2); in swp_freq_calcuation()
798 (*(V + 30 + v) >= 0) && in swp_freq_calcuation()
799 (*(V + 30 + v - 1) >= 0) && in swp_freq_calcuation()
800 (*(V + 30 + v - 2) >= 0) && in swp_freq_calcuation()
801 (*(V + 30 + v) > *(V + 30 + v - 2)) && in swp_freq_calcuation()
802 (*(V + 30 + v - 1) > *(V + 30 + v - 2)) && in swp_freq_calcuation()
803 ((*(V + 30 + v) > SIGMIN) || in swp_freq_calcuation()
804 (*(V + 30 + v - 1) > SIGMIN))) { in swp_freq_calcuation()
806 if (*(V + 30 + v) >= *(V + 30 + v - 1)) { in swp_freq_calcuation()
808 *SIG1 = *(V + 30 + v); in swp_freq_calcuation()
810 swp_freq = fOSC * 1000 + afcex_freq - swp_ofs; in swp_freq_calcuation()
811 *SIG1 = *(V + 30 + v - 1); in swp_freq_calcuation()
814 swp_freq = -1 ; in swp_freq_calcuation()
818 if ((*(V + 30 + v) > 0) && in swp_freq_calcuation()
819 (*(V + 30 + v + 1) > 0) && in swp_freq_calcuation()
820 (*(V + 30 + v + 2) > 0) && in swp_freq_calcuation()
821 (*(V + 30 + v + 1) > *(V + 30 + v)) && in swp_freq_calcuation()
822 (*(V + 30 + v + 1) > *(V + 30 + v + 2)) && in swp_freq_calcuation()
823 (*(V + 30 + v + 1) > SIGMIN)) { in swp_freq_calcuation()
826 *SIG1 = *(V + 30 + v + 1); in swp_freq_calcuation()
828 (*(V + 30 + v) >= 0) && in swp_freq_calcuation()
829 (*(V + 30 + v + 1) >= 0) && in swp_freq_calcuation()
830 (*(V + 30 + v + 1) > *(V + 30 + v)) && in swp_freq_calcuation()
831 (*(V + 30 + v + 1) > SIGMIN)) { in swp_freq_calcuation()
834 *SIG1 = *(V + 30 + v); in swp_freq_calcuation()
836 (*(V + 30 + v) > 0) && in swp_freq_calcuation()
837 (*(V + 30 + v + 1) > 0) && in swp_freq_calcuation()
838 (*(V + 30 + v + 2) > 0) && in swp_freq_calcuation()
839 (*(V + 30 + v) > *(V + 30 + v + 1)) && in swp_freq_calcuation()
840 (*(V + 30 + v) > *(V + 30 + v + 2)) && in swp_freq_calcuation()
841 (*(V + 30 + v) > SIGMIN)) { in swp_freq_calcuation()
844 *SIG1 = *(V + 30 + v); in swp_freq_calcuation()
845 } else if ((*(V + 30 + v) >= 0) && in swp_freq_calcuation()
846 (*(V + 30 + v + 1) >= 0) && in swp_freq_calcuation()
847 (*(V + 30 + v + 2) >= 0) && in swp_freq_calcuation()
848 (*(V + 30 + v + 3) >= 0) && in swp_freq_calcuation()
849 (*(V + 30 + v + 1) > *(V + 30 + v)) && in swp_freq_calcuation()
850 (*(V + 30 + v + 2) > *(V + 30 + v + 3)) && in swp_freq_calcuation()
851 ((*(V + 30 + v + 1) > SIGMIN) || in swp_freq_calcuation()
852 (*(V + 30 + v + 2) > SIGMIN))) { in swp_freq_calcuation()
854 if (*(V + 30 + v + 1) >= *(V + 30 + v + 2)) { in swp_freq_calcuation()
856 *SIG1 = *(V + 30 + v + 1); in swp_freq_calcuation()
859 *SIG1 = *(V + 30 + v + 2); in swp_freq_calcuation()
861 } else if ((*(V + 30 + v) >= 0) && in swp_freq_calcuation()
862 (*(V + 30 + v + 1) >= 0) && in swp_freq_calcuation()
863 (*(V + 30 + v + 2) >= 0) && in swp_freq_calcuation()
864 (*(V + 30 + v + 3) >= 0) && in swp_freq_calcuation()
865 (*(V + 30 + v) > *(V + 30 + v + 2)) && in swp_freq_calcuation()
866 (*(V + 30 + v + 1) > *(V + 30 + v + 2)) && in swp_freq_calcuation()
867 (*(V + 30 + v) > *(V + 30 + v + 3)) && in swp_freq_calcuation()
868 (*(V + 30 + v + 1) > *(V + 30 + v + 3)) && in swp_freq_calcuation()
869 ((*(V + 30 + v) > SIGMIN) || in swp_freq_calcuation()
870 (*(V + 30 + v + 1) > SIGMIN))) { in swp_freq_calcuation()
872 if (*(V + 30 + v) >= *(V + 30 + v + 1)) { in swp_freq_calcuation()
874 *SIG1 = *(V + 30 + v); in swp_freq_calcuation()
877 *SIG1 = *(V + 30 + v + 1); in swp_freq_calcuation()
880 (*(V + 30 + v) >= 0) && in swp_freq_calcuation()
881 (*(V + 30 + v + 1) >= 0) && in swp_freq_calcuation()
882 (*(V + 30 + v + 2) >= 0) && in swp_freq_calcuation()
883 (*(V + 30 + v + 1) > *(V + 30 + v)) && in swp_freq_calcuation()
884 (*(V + 30 + v + 2) > *(V + 30 + v)) && in swp_freq_calcuation()
885 ((*(V + 30 + v + 1) > SIGMIN) || in swp_freq_calcuation()
886 (*(V + 30 + v + 2) > SIGMIN))) { in swp_freq_calcuation()
888 if (*(V + 30 + v + 1) >= *(V + 30 + v + 2)) { in swp_freq_calcuation()
890 *SIG1 = *(V + 30 + v + 1); in swp_freq_calcuation()
893 *SIG1 = *(V + 30 + v + 2); in swp_freq_calcuation()
895 } else if ((vmax == 0) && (vmin == 0) && (*(V + 30 + v) > SIGMIN)) { in swp_freq_calcuation()
897 *SIG1 = *(V + 30 + v); in swp_freq_calcuation()
899 swp_freq = -1; in swp_freq_calcuation()
901 swp_freq = -1; in swp_freq_calcuation()
923 *afcex_freq = *fOSC * 1000 - swp_freq; in swp_info_get2()
925 *afcex_freq = swp_freq - *fOSC * 1000; in swp_info_get2()
927 AFCEX = *afcex_freq * 8192 / state->master_clk; in swp_info_get2()
939 AFCEX = afcex_freq * 8192 / state->master_clk; in afcex_info_get()
949 return -EREMOTEIO; in SEQ_set()
960 return -EREMOTEIO; in iq_vt_set()
970 return -EREMOTEIO; in FEC_srst()
980 return -EREMOTEIO; in S2T_set()
990 return -EREMOTEIO; in S45T_set()
1038 int ret = -1; in mb86a16_set_fe()
1041 dprintk(verbose, MB86A16_INFO, 1, "freq=%d Mhz, symbrt=%d Ksps", state->frequency, state->srate); in mb86a16_set_fe()
1044 swp_ofs = state->srate / 4; in mb86a16_set_fe()
1047 V[i] = -1; in mb86a16_set_fe()
1054 for (n = 0; ((n < 3) && (ret == -1)); n++) { in mb86a16_set_fe()
1069 return -1; in mb86a16_set_fe()
1073 return -1; in mb86a16_set_fe()
1077 return -1; /* (0, 0) */ in mb86a16_set_fe()
1079 if (AFCEXEN_set(state, AFCEXEN, state->srate) < 0) { in mb86a16_set_fe()
1081 return -1; /* (1, smrt) = (1, symbolrate) */ in mb86a16_set_fe()
1085 return -1; /* (0, 1, 2) */ in mb86a16_set_fe()
1089 return -1; /* (0, 0) */ in mb86a16_set_fe()
1091 smrt_info_get(state, state->srate); in mb86a16_set_fe()
1092 if (smrt_set(state, state->srate) < 0) { in mb86a16_set_fe()
1094 return -1; in mb86a16_set_fe()
1097 R = vco_dev_get(state, state->srate); in mb86a16_set_fe()
1099 fOSC_start = state->frequency; in mb86a16_set_fe()
1102 if (state->frequency % 2 == 0) { in mb86a16_set_fe()
1103 fOSC_start = state->frequency; in mb86a16_set_fe()
1105 fOSC_start = state->frequency + 1; in mb86a16_set_fe()
1107 fOSC_start = state->frequency - 1; in mb86a16_set_fe()
1120 vmax--; in mb86a16_set_fe()
1123 (ftemp - state->frequency * 1000 >= fcp + state->srate / 4)) in mb86a16_set_fe()
1132 ftemp = ftemp - swp_ofs; in mb86a16_set_fe()
1133 vmin--; in mb86a16_set_fe()
1141 (state->frequency * 1000 - ftemp >= fcp + state->srate / 4)) in mb86a16_set_fe()
1146 wait_t = (8000 + state->srate / 2) / state->srate; in mb86a16_set_fe()
1160 swp_info_get(state, fOSC_start, state->srate, in mb86a16_set_fe()
1165 if (rf_val_set(state, fOSC, state->srate, R) < 0) { in mb86a16_set_fe()
1167 return -1; in mb86a16_set_fe()
1172 return -1; in mb86a16_set_fe()
1176 return -1; in mb86a16_set_fe()
1182 return -1; in mb86a16_set_fe()
1184 V[30 + v] = SIG1 ; in mb86a16_set_fe()
1191 if ((abs(prev_swp_freq[j] - swp_freq)) < (swp_ofs * 3 / 2)) { in mb86a16_set_fe()
1196 … ((signal_dupl == 0) && (swp_freq > 0) && (abs(swp_freq - state->frequency * 1000) < fcp + state->… in mb86a16_set_fe()
1197 …dprintk(verbose, MB86A16_DEBUG, 1, "------ Signal detect ------ [swp_freq=[%07d, srate=%05d]]", sw… in mb86a16_set_fe()
1200 swp_info_get2(state, state->srate, R, swp_freq, in mb86a16_set_fe()
1204 if (rf_val_set(state, fOSC, state->srate, R) < 0) { in mb86a16_set_fe()
1206 return -1; in mb86a16_set_fe()
1210 return -1; in mb86a16_set_fe()
1212 signal = signal_det(state, state->srate, &SIG1); in mb86a16_set_fe()
1218 smrt_info_get(state, state->srate); in mb86a16_set_fe()
1219 if (smrt_set(state, state->srate) < 0) { in mb86a16_set_fe()
1221 return -1; in mb86a16_set_fe()
1239 v = -i / 2; in mb86a16_set_fe()
1255 return -1; in mb86a16_set_fe()
1257 smrt_info_get(state, state->srate); in mb86a16_set_fe()
1258 if (smrt_set(state, state->srate) < 0) { in mb86a16_set_fe()
1260 return -1; in mb86a16_set_fe()
1264 return -1; in mb86a16_set_fe()
1266 if (AFCEXEN_set(state, AFCEXEN, state->srate) < 0) { in mb86a16_set_fe()
1268 return -1; in mb86a16_set_fe()
1273 return -1; in mb86a16_set_fe()
1277 return -1; in mb86a16_set_fe()
1280 wait_t = 200000 / state->master_clk + 200000 / state->srate; in mb86a16_set_fe()
1283 if (afcerr == -1) in mb86a16_set_fe()
1284 return -1; in mb86a16_set_fe()
1288 if (state->srate >= 1500) in mb86a16_set_fe()
1289 smrt_d = state->srate / 3; in mb86a16_set_fe()
1291 smrt_d = state->srate / 2; in mb86a16_set_fe()
1295 return -1; in mb86a16_set_fe()
1299 return -1; in mb86a16_set_fe()
1304 return -1; in mb86a16_set_fe()
1307 temp_freq = swp_freq + (i - 1) * state->srate / 8; in mb86a16_set_fe()
1311 return -1; in mb86a16_set_fe()
1315 return -1; in mb86a16_set_fe()
1317 wait_t = 200000 / state->master_clk + 40000 / smrt_d; in mb86a16_set_fe()
1323 (dagcm[0] - dagcm[1] > 2 * (dagcm[2] - dagcm[1]))) { in mb86a16_set_fe()
1325 temp_freq = swp_freq - 2 * state->srate / 8; in mb86a16_set_fe()
1329 return -1; in mb86a16_set_fe()
1333 return -1; in mb86a16_set_fe()
1335 wait_t = 200000 / state->master_clk + 40000 / smrt_d; in mb86a16_set_fe()
1339 delta_freq = (dagcm[2] - dagcm[0] + dagcm[1] - dagcm[3]) * state->srate / 300; in mb86a16_set_fe()
1344 (dagcm[2] - dagcm[1] > 2 * (dagcm[0] - dagcm[1]))) { in mb86a16_set_fe()
1346 temp_freq = swp_freq + 2 * state->srate / 8; in mb86a16_set_fe()
1350 return -1; in mb86a16_set_fe()
1354 return -1; in mb86a16_set_fe()
1356 wait_t = 200000 / state->master_clk + 40000 / smrt_d; in mb86a16_set_fe()
1360 delta_freq = (dagcm[2] - dagcm[0] + dagcm[3] - dagcm[1]) * state->srate / 300; in mb86a16_set_fe()
1370 if (abs(state->frequency * 1000 - swp_freq) > 3800) { in mb86a16_set_fe()
1371 dprintk(verbose, MB86A16_INFO, 1, "NO -- SIGNAL !"); in mb86a16_set_fe()
1382 return -1; in mb86a16_set_fe()
1386 return -1; in mb86a16_set_fe()
1388 R = vco_dev_get(state, state->srate); in mb86a16_set_fe()
1389 smrt_info_get(state, state->srate); in mb86a16_set_fe()
1390 if (smrt_set(state, state->srate) < 0) { in mb86a16_set_fe()
1392 return -1; in mb86a16_set_fe()
1396 return -1; in mb86a16_set_fe()
1398 if (AFCEXEN_set(state, AFCEXEN, state->srate) < 0) { in mb86a16_set_fe()
1400 return -1; in mb86a16_set_fe()
1402 swp_info_get2(state, state->srate, R, swp_freq, &afcex_freq, &fOSC, &AFCEX_L, &AFCEX_H); in mb86a16_set_fe()
1403 if (rf_val_set(state, fOSC, state->srate, R) < 0) { in mb86a16_set_fe()
1405 return -1; in mb86a16_set_fe()
1409 return -1; in mb86a16_set_fe()
1413 return -1; in mb86a16_set_fe()
1415 wait_t = 7 + (10000 + state->srate / 2) / state->srate; in mb86a16_set_fe()
1421 return -EREMOTEIO; in mb86a16_set_fe()
1426 wait_t = 7 + (917504 + state->srate / 2) / state->srate; in mb86a16_set_fe()
1429 wait_t = 7 + (1048576 + state->srate / 2) / state->srate; in mb86a16_set_fe()
1432 wait_t = 7 + (1310720 + state->srate / 2) / state->srate; in mb86a16_set_fe()
1435 wait_t = 7 + (1572864 + state->srate / 2) / state->srate; in mb86a16_set_fe()
1438 wait_t = 7 + (2097152 + state->srate / 2) / state->srate; in mb86a16_set_fe()
1447 dprintk(verbose, MB86A16_INFO, 1, "-------- Viterbi=[%d] SYNC=[%d] ---------", VIRM, sync); in mb86a16_set_fe()
1452 wait_t = (786432 + state->srate / 2) / state->srate; in mb86a16_set_fe()
1454 wait_t = (1572864 + state->srate / 2) / state->srate; in mb86a16_set_fe()
1465 wait_t = (786432 + state->srate / 2) / state->srate; in mb86a16_set_fe()
1467 wait_t = (1572864 + state->srate / 2) / state->srate; in mb86a16_set_fe()
1471 dprintk(verbose, MB86A16_INFO, 1, "NO -- SYNC"); in mb86a16_set_fe()
1473 ret = -1; in mb86a16_set_fe()
1477 dprintk(verbose, MB86A16_INFO, 1, "NO -- SIGNAL"); in mb86a16_set_fe()
1478 ret = -1; in mb86a16_set_fe()
1484 freqerr_chk(state, state->frequency, state->srate, 1); in mb86a16_set_fe()
1492 ret = -EREMOTEIO; in mb86a16_set_fe()
1502 struct mb86a16_state *state = fe->demodulator_priv; in mb86a16_send_diseqc_msg()
1503 int ret = -EREMOTEIO; in mb86a16_send_diseqc_msg()
1516 if (cmd->msg_len > 5 || cmd->msg_len < 4) { in mb86a16_send_diseqc_msg()
1517 ret = -EINVAL; in mb86a16_send_diseqc_msg()
1521 for (i = 0; i < cmd->msg_len; i++) { in mb86a16_send_diseqc_msg()
1522 if (mb86a16_write(state, regs, cmd->msg[i]) < 0) in mb86a16_send_diseqc_msg()
1546 struct mb86a16_state *state = fe->demodulator_priv; in mb86a16_send_diseqc_burst()
1569 return -EREMOTEIO; in mb86a16_send_diseqc_burst()
1574 struct mb86a16_state *state = fe->demodulator_priv; in mb86a16_set_tone()
1596 return -EINVAL; in mb86a16_set_tone()
1602 return -EREMOTEIO; in mb86a16_set_tone()
1607 struct dtv_frontend_properties *p = &fe->dtv_property_cache; in mb86a16_search()
1608 struct mb86a16_state *state = fe->demodulator_priv; in mb86a16_search()
1610 state->frequency = p->frequency / 1000; in mb86a16_search()
1611 state->srate = p->symbol_rate / 1000; in mb86a16_search()
1624 struct mb86a16_state *state = fe->demodulator_priv; in mb86a16_release()
1643 struct mb86a16_state *state = fe->demodulator_priv; in mb86a16_read_ber()
1664 * value with a Reed-Solomon decoder error amount at in mb86a16_read_ber()
1702 return -EREMOTEIO; in mb86a16_read_ber()
1708 struct mb86a16_state *state = fe->demodulator_priv; in mb86a16_read_signal_strength()
1713 return -EREMOTEIO; in mb86a16_read_signal_strength()
1716 *strength = ((0xff - agcm) * 100) / 256; in mb86a16_read_signal_strength()
1718 *strength = (0xffff - 0xff) + agcm; in mb86a16_read_signal_strength()
1749 { 208, 30 }
1754 struct mb86a16_state *state = fe->demodulator_priv; in mb86a16_read_snr()
1756 int low_tide = 2, high_tide = 30, q_level; in mb86a16_read_snr()
1762 return -EREMOTEIO; in mb86a16_read_snr()
1771 q_level = (*snr * 100) / (high_tide - low_tide); in mb86a16_read_snr()
1773 *snr = (0xffff - 0xff) + *snr; in mb86a16_read_snr()
1781 struct mb86a16_state *state = fe->demodulator_priv; in mb86a16_read_ucblocks()
1785 return -EREMOTEIO; in mb86a16_read_ucblocks()
1800 .name = "Fujitsu MB86A16 DVB-S",
1840 state->config = config; in mb86a16_attach()
1841 state->i2c_adap = i2c_adap; in mb86a16_attach()
1847 memcpy(&state->frontend.ops, &mb86a16_ops, sizeof(struct dvb_frontend_ops)); in mb86a16_attach()
1848 state->frontend.demodulator_priv = state; in mb86a16_attach()
1849 state->frontend.ops.set_voltage = state->config->set_voltage; in mb86a16_attach()
1851 return &state->frontend; in mb86a16_attach()
1857 MODULE_DESCRIPTION("Fujitsu MB86A16 DVB-S/DSS DC Receiver driver");