Lines Matching refs:ret
52 int ret; in af9005_write_word_agc() local
54 if ((ret = af9005_write_ofdm_register(d, reglo, (u8) (value & 0xff)))) in af9005_write_word_agc()
55 return ret; in af9005_write_word_agc()
63 int ret; in af9005_read_word_agc() local
66 if ((ret = af9005_read_ofdm_register(d, reglo, &temp0))) in af9005_read_word_agc()
67 return ret; in af9005_read_word_agc()
68 if ((ret = af9005_read_ofdm_register(d, reghi, &temp1))) in af9005_read_word_agc()
69 return ret; in af9005_read_word_agc()
94 int ret; in af9005_is_fecmon_available() local
99 ret = af9005_read_register_bits(state->d, xd_p_fec_vtb_rsd_mon_en, in af9005_is_fecmon_available()
102 if (ret) in af9005_is_fecmon_available()
103 return ret; in af9005_is_fecmon_available()
105 ret = in af9005_is_fecmon_available()
110 if (ret) in af9005_is_fecmon_available()
111 return ret; in af9005_is_fecmon_available()
125 int ret; in af9005_get_post_vit_err_cw_count() local
135 ret = in af9005_get_post_vit_err_cw_count()
139 if (ret) in af9005_get_post_vit_err_cw_count()
140 return ret; in af9005_get_post_vit_err_cw_count()
146 ret = in af9005_get_post_vit_err_cw_count()
150 if (ret) in af9005_get_post_vit_err_cw_count()
151 return ret; in af9005_get_post_vit_err_cw_count()
152 ret = in af9005_get_post_vit_err_cw_count()
156 if (ret) in af9005_get_post_vit_err_cw_count()
157 return ret; in af9005_get_post_vit_err_cw_count()
161 ret = in af9005_get_post_vit_err_cw_count()
164 if (ret) in af9005_get_post_vit_err_cw_count()
165 return ret; in af9005_get_post_vit_err_cw_count()
166 ret = in af9005_get_post_vit_err_cw_count()
169 if (ret) in af9005_get_post_vit_err_cw_count()
170 return ret; in af9005_get_post_vit_err_cw_count()
171 ret = in af9005_get_post_vit_err_cw_count()
174 if (ret) in af9005_get_post_vit_err_cw_count()
175 return ret; in af9005_get_post_vit_err_cw_count()
180 ret = in af9005_get_post_vit_err_cw_count()
183 if (ret) in af9005_get_post_vit_err_cw_count()
184 return ret; in af9005_get_post_vit_err_cw_count()
185 ret = in af9005_get_post_vit_err_cw_count()
188 if (ret) in af9005_get_post_vit_err_cw_count()
189 return ret; in af9005_get_post_vit_err_cw_count()
209 int ret; in af9005_get_post_vit_ber() local
211 ret = in af9005_get_post_vit_ber()
214 if (ret) in af9005_get_post_vit_ber()
215 return ret; in af9005_get_post_vit_ber()
230 int ret; in af9005_get_pre_vit_err_bit_count() local
232 ret = in af9005_get_pre_vit_err_bit_count()
236 if (ret) in af9005_get_pre_vit_err_bit_count()
237 return ret; in af9005_get_pre_vit_err_bit_count()
242 ret = in af9005_get_pre_vit_err_bit_count()
245 if (ret) in af9005_get_pre_vit_err_bit_count()
246 return ret; in af9005_get_pre_vit_err_bit_count()
247 ret = in af9005_get_pre_vit_err_bit_count()
250 if (ret) in af9005_get_pre_vit_err_bit_count()
251 return ret; in af9005_get_pre_vit_err_bit_count()
252 ret = in af9005_get_pre_vit_err_bit_count()
255 if (ret) in af9005_get_pre_vit_err_bit_count()
256 return ret; in af9005_get_pre_vit_err_bit_count()
259 ret = in af9005_get_pre_vit_err_bit_count()
262 if (ret) in af9005_get_pre_vit_err_bit_count()
263 return ret; in af9005_get_pre_vit_err_bit_count()
264 ret = in af9005_get_pre_vit_err_bit_count()
267 if (ret) in af9005_get_pre_vit_err_bit_count()
268 return ret; in af9005_get_pre_vit_err_bit_count()
276 ret = in af9005_get_pre_vit_err_bit_count()
280 if (ret) in af9005_get_pre_vit_err_bit_count()
281 return ret; in af9005_get_pre_vit_err_bit_count()
294 ret = in af9005_get_pre_vit_err_bit_count()
298 if (ret) in af9005_get_pre_vit_err_bit_count()
299 return ret; in af9005_get_pre_vit_err_bit_count()
323 int ret; in af9005_reset_pre_viterbi() local
326 ret = in af9005_reset_pre_viterbi()
329 if (ret) in af9005_reset_pre_viterbi()
330 return ret; in af9005_reset_pre_viterbi()
331 ret = af9005_write_ofdm_register(state->d, xd_p_fec_super_frm_unit_15_8, in af9005_reset_pre_viterbi()
333 if (ret) in af9005_reset_pre_viterbi()
334 return ret; in af9005_reset_pre_viterbi()
336 ret = in af9005_reset_pre_viterbi()
341 return ret; in af9005_reset_pre_viterbi()
347 int ret; in af9005_reset_post_viterbi() local
350 ret = in af9005_reset_post_viterbi()
353 if (ret) in af9005_reset_post_viterbi()
354 return ret; in af9005_reset_post_viterbi()
355 ret = in af9005_reset_post_viterbi()
358 if (ret) in af9005_reset_post_viterbi()
359 return ret; in af9005_reset_post_viterbi()
361 ret = in af9005_reset_post_viterbi()
366 return ret; in af9005_reset_post_viterbi()
372 int ret, fecavailable; in af9005_get_statistic() local
376 ret = af9005_is_fecmon_available(fe, &fecavailable); in af9005_get_statistic()
377 if (ret) in af9005_get_statistic()
378 return ret; in af9005_get_statistic()
384 ret = af9005_get_pre_vit_err_bit_count(fe, &state->pre_vit_error_count, in af9005_get_statistic()
386 if (ret == 0) { in af9005_get_statistic()
401 ret = af9005_get_post_vit_ber(fe, &state->post_vit_error_count, in af9005_get_statistic()
404 if (ret == 0) { in af9005_get_statistic()
405 ret = af9005_reset_post_viterbi(fe); in af9005_get_statistic()
407 if (ret) in af9005_get_statistic()
408 return ret; in af9005_get_statistic()
432 int ret; in af9005_fe_read_status() local
438 ret = af9005_read_register_bits(state->d, xd_p_agc_lock, in af9005_fe_read_status()
440 if (ret) in af9005_fe_read_status()
441 return ret; in af9005_fe_read_status()
445 ret = af9005_read_register_bits(state->d, xd_p_fd_tpsd_lock, in af9005_fe_read_status()
448 if (ret) in af9005_fe_read_status()
449 return ret; in af9005_fe_read_status()
453 ret = af9005_read_register_bits(state->d, in af9005_fe_read_status()
457 if (ret) in af9005_fe_read_status()
458 return ret; in af9005_fe_read_status()
464 ret = in af9005_fe_read_status()
468 if (ret) in af9005_fe_read_status()
469 return ret; in af9005_fe_read_status()
501 int ret; in af9005_fe_read_signal_strength() local
506 ret = in af9005_fe_read_signal_strength()
509 if (ret) in af9005_fe_read_signal_strength()
510 return ret; in af9005_fe_read_signal_strength()
511 ret = in af9005_fe_read_signal_strength()
514 if (ret) in af9005_fe_read_signal_strength()
515 return ret; in af9005_fe_read_signal_strength()
533 int ret; in af9005_fe_program_cfoe() local
589 ret = af9005_write_ofdm_register(d, 0xAE00, buf[0]); in af9005_fe_program_cfoe()
590 if (ret) in af9005_fe_program_cfoe()
591 return ret; in af9005_fe_program_cfoe()
594 ret = af9005_write_ofdm_register(d, 0xAE01, buf[1]); in af9005_fe_program_cfoe()
595 if (ret) in af9005_fe_program_cfoe()
596 return ret; in af9005_fe_program_cfoe()
599 ret = af9005_write_ofdm_register(d, 0xAE02, buf[2]); in af9005_fe_program_cfoe()
600 if (ret) in af9005_fe_program_cfoe()
601 return ret; in af9005_fe_program_cfoe()
604 ret = af9005_write_ofdm_register(d, 0xAE03, buf[3]); in af9005_fe_program_cfoe()
605 if (ret) in af9005_fe_program_cfoe()
606 return ret; in af9005_fe_program_cfoe()
623 ret = af9005_write_ofdm_register(d, 0xAE04, buf[0]); in af9005_fe_program_cfoe()
624 if (ret) in af9005_fe_program_cfoe()
625 return ret; in af9005_fe_program_cfoe()
627 ret = af9005_write_ofdm_register(d, 0xAE05, buf[1]); in af9005_fe_program_cfoe()
628 if (ret) in af9005_fe_program_cfoe()
629 return ret; in af9005_fe_program_cfoe()
631 ret = af9005_write_ofdm_register(d, 0xAE06, buf[2]); in af9005_fe_program_cfoe()
632 if (ret) in af9005_fe_program_cfoe()
633 return ret; in af9005_fe_program_cfoe()
635 ret = af9005_write_ofdm_register(d, 0xAE07, buf[3]); in af9005_fe_program_cfoe()
636 if (ret) in af9005_fe_program_cfoe()
637 return ret; in af9005_fe_program_cfoe()
654 ret = af9005_write_ofdm_register(d, 0xAE08, buf[0]); in af9005_fe_program_cfoe()
655 if (ret) in af9005_fe_program_cfoe()
656 return ret; in af9005_fe_program_cfoe()
658 ret = af9005_write_ofdm_register(d, 0xAE09, buf[1]); in af9005_fe_program_cfoe()
659 if (ret) in af9005_fe_program_cfoe()
660 return ret; in af9005_fe_program_cfoe()
662 ret = af9005_write_ofdm_register(d, 0xAE0A, buf[2]); in af9005_fe_program_cfoe()
663 if (ret) in af9005_fe_program_cfoe()
664 return ret; in af9005_fe_program_cfoe()
666 ret = af9005_write_ofdm_register(d, 0xAE0B, buf[3]); in af9005_fe_program_cfoe()
667 if (ret) in af9005_fe_program_cfoe()
668 return ret; in af9005_fe_program_cfoe()
685 ret = af9005_write_ofdm_register(d, 0xAE0C, buf[0]); in af9005_fe_program_cfoe()
686 if (ret) in af9005_fe_program_cfoe()
687 return ret; in af9005_fe_program_cfoe()
689 ret = af9005_write_ofdm_register(d, 0xAE0D, buf[1]); in af9005_fe_program_cfoe()
690 if (ret) in af9005_fe_program_cfoe()
691 return ret; in af9005_fe_program_cfoe()
693 ret = af9005_write_ofdm_register(d, 0xAE0E, buf[2]); in af9005_fe_program_cfoe()
694 if (ret) in af9005_fe_program_cfoe()
695 return ret; in af9005_fe_program_cfoe()
697 ret = af9005_write_ofdm_register(d, 0xAE0F, buf[3]); in af9005_fe_program_cfoe()
698 if (ret) in af9005_fe_program_cfoe()
699 return ret; in af9005_fe_program_cfoe()
716 ret = af9005_write_ofdm_register(d, 0xAE10, buf[0]); in af9005_fe_program_cfoe()
717 if (ret) in af9005_fe_program_cfoe()
718 return ret; in af9005_fe_program_cfoe()
720 ret = af9005_write_ofdm_register(d, 0xAE11, buf[1]); in af9005_fe_program_cfoe()
721 if (ret) in af9005_fe_program_cfoe()
722 return ret; in af9005_fe_program_cfoe()
724 ret = af9005_write_ofdm_register(d, 0xAE12, buf[2]); in af9005_fe_program_cfoe()
725 if (ret) in af9005_fe_program_cfoe()
726 return ret; in af9005_fe_program_cfoe()
728 ret = af9005_write_ofdm_register(d, 0xAE13, buf[3]); in af9005_fe_program_cfoe()
729 if (ret) in af9005_fe_program_cfoe()
730 return ret; in af9005_fe_program_cfoe()
747 ret = af9005_write_ofdm_register(d, 0xAE14, buf[0]); in af9005_fe_program_cfoe()
748 if (ret) in af9005_fe_program_cfoe()
749 return ret; in af9005_fe_program_cfoe()
751 ret = af9005_write_ofdm_register(d, 0xAE15, buf[1]); in af9005_fe_program_cfoe()
752 if (ret) in af9005_fe_program_cfoe()
753 return ret; in af9005_fe_program_cfoe()
755 ret = af9005_write_ofdm_register(d, 0xAE16, buf[2]); in af9005_fe_program_cfoe()
756 if (ret) in af9005_fe_program_cfoe()
757 return ret; in af9005_fe_program_cfoe()
759 ret = af9005_write_ofdm_register(d, 0xAE17, buf[3]); in af9005_fe_program_cfoe()
760 return ret; in af9005_fe_program_cfoe()
789 int ret; in af9005_fe_power() local
791 ret = af9005_send_command(state->d, 0x03, &temp, 1, NULL, 0); in af9005_fe_power()
792 return ret; in af9005_fe_power()
807 int ret, i, scriptlen; in af9005_fe_init() local
816 if ((ret = in af9005_fe_init()
819 return ret; in af9005_fe_init()
820 if ((ret = af9005_write_ofdm_register(state->d, APO_REG_RESET, 0))) in af9005_fe_init()
821 return ret; in af9005_fe_init()
825 if ((ret = in af9005_fe_init()
828 return ret; in af9005_fe_init()
846 ret = af9005_write_ofdm_register(state->d, 0xb200, 0xa9); in af9005_fe_init()
847 if (ret) in af9005_fe_init()
848 return ret; in af9005_fe_init()
849 ret = af9005_write_ofdm_register(state->d, xd_g_reg_ofsm_clk, 0x07); in af9005_fe_init()
850 if (ret) in af9005_fe_init()
851 return ret; in af9005_fe_init()
853 ret = af9005_send_command(state->d, 0x03, &temp, 1, NULL, 0); in af9005_fe_init()
854 if (ret) in af9005_fe_init()
855 return ret; in af9005_fe_init()
856 ret = af9005_write_ofdm_register(state->d, xd_g_reg_ofsm_clk, 0x00); in af9005_fe_init()
857 if (ret) in af9005_fe_init()
858 return ret; in af9005_fe_init()
859 ret = af9005_write_ofdm_register(state->d, 0xb200, 0xa1); in af9005_fe_init()
860 if (ret) in af9005_fe_init()
861 return ret; in af9005_fe_init()
864 if ((ret = in af9005_fe_init()
867 return ret; in af9005_fe_init()
868 ret = af9005_write_register_bits(state->d, xd_I2C_reg_ofdm_rst, in af9005_fe_init()
871 if (ret) in af9005_fe_init()
872 return ret; in af9005_fe_init()
874 ret = af9005_write_ofdm_register(state->d, 0xaefc, 0); in af9005_fe_init()
875 if (ret) in af9005_fe_init()
876 return ret; in af9005_fe_init()
880 if ((ret = in af9005_fe_init()
884 return ret; in af9005_fe_init()
888 if ((ret = in af9005_fe_init()
892 return ret; in af9005_fe_init()
893 if ((ret = in af9005_fe_init()
897 return ret; in af9005_fe_init()
901 if ((ret = in af9005_fe_init()
903 return ret; in af9005_fe_init()
907 if ((ret = in af9005_fe_init()
910 return ret; in af9005_fe_init()
912 ret = af9005_write_ofdm_register(state->d, 0xa16c, 1); in af9005_fe_init()
913 if (ret) in af9005_fe_init()
914 return ret; in af9005_fe_init()
915 ret = af9005_write_ofdm_register(state->d, 0xa3c1, 0); in af9005_fe_init()
916 if (ret) in af9005_fe_init()
917 return ret; in af9005_fe_init()
921 ret = af9005_fe_program_cfoe(state->d, 6000000); in af9005_fe_init()
922 if (ret) in af9005_fe_init()
923 return ret; in af9005_fe_init()
926 if ((ret = in af9005_fe_init()
930 return ret; in af9005_fe_init()
937 if ((ret = in af9005_fe_init()
941 return ret; in af9005_fe_init()
945 if ((ret = in af9005_fe_init()
949 return ret; in af9005_fe_init()
952 ret = af9005_write_ofdm_register(state->d, 0xa601, 0); in af9005_fe_init()
956 if ((ret = af9005_write_ofdm_register(state->d, 0xaefb, 0x01))) in af9005_fe_init()
957 return ret; in af9005_fe_init()
963 if ((ret = in af9005_fe_init()
967 return ret; in af9005_fe_init()
995 ret = in af9005_fe_init()
1000 if (ret) in af9005_fe_init()
1001 return ret; in af9005_fe_init()
1004 ret = in af9005_fe_init()
1009 if (ret) in af9005_fe_init()
1010 return ret; in af9005_fe_init()
1013 ret = in af9005_fe_init()
1016 if (ret) in af9005_fe_init()
1017 return ret; in af9005_fe_init()
1020 ret = in af9005_fe_init()
1023 if (ret) in af9005_fe_init()
1024 return ret; in af9005_fe_init()
1029 ret = af9005_read_eeprom(adap->dev, 0xc6, buf, 2); in af9005_fe_init()
1030 if (ret) { in af9005_fe_init()
1032 return ret; in af9005_fe_init()
1038 ret = af9005_read_eeprom(adap->dev, 0xc8, buf, 2); in af9005_fe_init()
1039 if (ret) { in af9005_fe_init()
1041 return ret; in af9005_fe_init()
1062 ret = fe->ops.tuner_ops.init(fe); in af9005_fe_init()
1063 if (ret) in af9005_fe_init()
1064 return ret; in af9005_fe_init()
1095 int ret; in af9005_fe_set_frontend() local
1107 ret = af9005_led_control(state->d, 0); in af9005_fe_set_frontend()
1108 if (ret) in af9005_fe_set_frontend()
1109 return ret; in af9005_fe_set_frontend()
1111 ret = af9005_write_register_bits(state->d, XD_MP2IF_MISC, 2, 1, 0); in af9005_fe_set_frontend()
1112 if (ret) in af9005_fe_set_frontend()
1113 return ret; in af9005_fe_set_frontend()
1120 ret = af9005_write_ofdm_register(state->d, 0xae1a, temp0); in af9005_fe_set_frontend()
1121 if (ret) in af9005_fe_set_frontend()
1122 return ret; in af9005_fe_set_frontend()
1123 ret = af9005_write_ofdm_register(state->d, 0xae19, temp1); in af9005_fe_set_frontend()
1124 if (ret) in af9005_fe_set_frontend()
1125 return ret; in af9005_fe_set_frontend()
1126 ret = af9005_write_ofdm_register(state->d, 0xae18, temp2); in af9005_fe_set_frontend()
1127 if (ret) in af9005_fe_set_frontend()
1128 return ret; in af9005_fe_set_frontend()
1132 ret = in af9005_fe_set_frontend()
1137 if (ret) in af9005_fe_set_frontend()
1138 return ret; in af9005_fe_set_frontend()
1139 ret = in af9005_fe_set_frontend()
1144 if (ret) in af9005_fe_set_frontend()
1145 return ret; in af9005_fe_set_frontend()
1146 ret = in af9005_fe_set_frontend()
1149 if (ret) in af9005_fe_set_frontend()
1150 return ret; in af9005_fe_set_frontend()
1151 ret = in af9005_fe_set_frontend()
1154 if (ret) in af9005_fe_set_frontend()
1155 return ret; in af9005_fe_set_frontend()
1159 ret = af9005_fe_select_bw(state->d, fep->bandwidth_hz); in af9005_fe_set_frontend()
1160 if (ret) in af9005_fe_set_frontend()
1161 return ret; in af9005_fe_set_frontend()
1162 ret = af9005_fe_program_cfoe(state->d, fep->bandwidth_hz); in af9005_fe_set_frontend()
1163 if (ret) in af9005_fe_set_frontend()
1164 return ret; in af9005_fe_set_frontend()
1168 ret = af9005_write_ofdm_register(state->d, 0xaefd, 0); in af9005_fe_set_frontend()
1169 if (ret) in af9005_fe_set_frontend()
1170 return ret; in af9005_fe_set_frontend()
1174 ret = in af9005_fe_set_frontend()
1177 if (ret) in af9005_fe_set_frontend()
1178 return ret; in af9005_fe_set_frontend()
1181 ret = fe->ops.tuner_ops.set_params(fe); in af9005_fe_set_frontend()
1182 if (ret) in af9005_fe_set_frontend()
1183 return ret; in af9005_fe_set_frontend()
1188 ret = af9005_write_tuner_registers(state->d, 0xffff, &temp, 1); in af9005_fe_set_frontend()
1189 if (ret) in af9005_fe_set_frontend()
1190 return ret; in af9005_fe_set_frontend()
1194 ret = in af9005_fe_set_frontend()
1198 if (ret) in af9005_fe_set_frontend()
1199 return ret; in af9005_fe_set_frontend()
1221 int ret; in af9005_fe_get_frontend() local
1225 ret = in af9005_fe_get_frontend()
1229 if (ret) in af9005_fe_get_frontend()
1230 return ret; in af9005_fe_get_frontend()
1249 ret = in af9005_fe_get_frontend()
1253 if (ret) in af9005_fe_get_frontend()
1254 return ret; in af9005_fe_get_frontend()
1276 ret = in af9005_fe_get_frontend()
1279 if (ret) in af9005_fe_get_frontend()
1280 return ret; in af9005_fe_get_frontend()
1285 ret = in af9005_fe_get_frontend()
1289 if (ret) in af9005_fe_get_frontend()
1290 return ret; in af9005_fe_get_frontend()
1316 ret = in af9005_fe_get_frontend()
1320 if (ret) in af9005_fe_get_frontend()
1321 return ret; in af9005_fe_get_frontend()
1347 ret = in af9005_fe_get_frontend()
1350 if (ret) in af9005_fe_get_frontend()
1351 return ret; in af9005_fe_get_frontend()
1373 ret = in af9005_fe_get_frontend()
1377 if (ret) in af9005_fe_get_frontend()
1378 return ret; in af9005_fe_get_frontend()
1392 ret = in af9005_fe_get_frontend()