Lines Matching refs:ic
379 u32 ic = 0, qc = 0, temp = 0; in rtw8822c_dac_cal_adc() local
413 rtw8822c_dac_cal_rf_mode(rtwdev, &ic, &qc); in rtw8822c_dac_cal_adc()
415 "[DACK] before: i=0x%x, q=0x%x\n", ic, qc); in rtw8822c_dac_cal_adc()
418 if (ic != 0x0) { in rtw8822c_dac_cal_adc()
419 ic = 0x400 - ic; in rtw8822c_dac_cal_adc()
420 *adc_ic = ic; in rtw8822c_dac_cal_adc()
426 temp = (ic & 0x3ff) | ((qc & 0x3ff) << 10); in rtw8822c_dac_cal_adc()
433 rtw8822c_dac_cal_rf_mode(rtwdev, &ic, &qc); in rtw8822c_dac_cal_adc()
435 "[DACK] after: i=0x%08x, q=0x%08x\n", ic, qc); in rtw8822c_dac_cal_adc()
436 if (ic >= 0x200) in rtw8822c_dac_cal_adc()
437 ic = 0x400 - ic; in rtw8822c_dac_cal_adc()
440 if (ic < 5 && qc < 5) in rtw8822c_dac_cal_adc()
502 u32 ic, qc, ic_in, qc_in; in rtw8822c_dac_cal_step2() local
517 ic = ic_in; in rtw8822c_dac_cal_step2()
521 if (ic != 0x0) in rtw8822c_dac_cal_step2()
522 ic = 0x400 - ic; in rtw8822c_dac_cal_step2()
525 if (ic < 0x300) { in rtw8822c_dac_cal_step2()
526 ic = ic * 2 * 6 / 5; in rtw8822c_dac_cal_step2()
527 ic = ic + 0x80; in rtw8822c_dac_cal_step2()
529 ic = (0x400 - ic) * 2 * 6 / 5; in rtw8822c_dac_cal_step2()
530 ic = 0x7f - ic; in rtw8822c_dac_cal_step2()
540 *ic_out = ic; in rtw8822c_dac_cal_step2()
544 rtw_dbg(rtwdev, RTW_DBG_RFK, "[DACK] after i=0x%x, q=0x%x\n", ic, qc); in rtw8822c_dac_cal_step2()
554 u32 ic, qc; in rtw8822c_dac_cal_step3() local
559 ic = *ic_in; in rtw8822c_dac_cal_step3()
568 rtw_write32_mask(rtwdev, base_addr + 0xbc, 0xf0000000, ic & 0xf); in rtw8822c_dac_cal_step3()
569 rtw_write32_mask(rtwdev, base_addr + 0xc0, 0xf, (ic & 0xf0) >> 4); in rtw8822c_dac_cal_step3()
585 if (!check_hw_ready(rtwdev, read_addr + 0x24, 0x07f80000, ic) || in rtw8822c_dac_cal_step3()
598 rtw8822c_dac_cal_rf_mode(rtwdev, &ic, &qc); in rtw8822c_dac_cal_step3()
599 if (ic >= 0x10) in rtw8822c_dac_cal_step3()
600 ic = ic - 0x10; in rtw8822c_dac_cal_step3()
602 ic = 0x400 - (0x10 - ic); in rtw8822c_dac_cal_step3()
609 *i_out = ic; in rtw8822c_dac_cal_step3()
612 if (ic >= 0x200) in rtw8822c_dac_cal_step3()
613 ic = 0x400 - ic; in rtw8822c_dac_cal_step3()
617 *ic_in = ic; in rtw8822c_dac_cal_step3()
928 u32 ic = 0, qc = 0, i; in rtw8822c_rf_dac_cal() local
946 rtw8822c_dac_cal_step2(rtwdev, RF_PATH_A, &ic, &qc); in rtw8822c_rf_dac_cal()
947 ic_a = ic; in rtw8822c_rf_dac_cal()
951 &ic, &qc, &i_a, &q_a); in rtw8822c_rf_dac_cal()
953 if (ic < 5 && qc < 5) in rtw8822c_rf_dac_cal()
962 rtw8822c_dac_cal_step2(rtwdev, RF_PATH_B, &ic, &qc); in rtw8822c_rf_dac_cal()
963 ic_b = ic; in rtw8822c_rf_dac_cal()
967 &ic, &qc, &i_b, &q_b); in rtw8822c_rf_dac_cal()
969 if (ic < 5 && qc < 5) in rtw8822c_rf_dac_cal()