Lines Matching refs:wbd
894 static s16 dib0090_wbd_to_db(struct dib0090_state *state, u16 wbd) in dib0090_wbd_to_db() argument
896 wbd &= 0x3ff; in dib0090_wbd_to_db()
897 if (wbd < state->wbd_offset) in dib0090_wbd_to_db()
898 wbd = 0; in dib0090_wbd_to_db()
900 wbd -= state->wbd_offset; in dib0090_wbd_to_db()
902 return -640 + (s16) slopes_to_scale(dib0090_wbd_slopes, ARRAY_SIZE(dib0090_wbd_slopes), wbd); in dib0090_wbd_to_db()
1212 s16 wbd = 0, i, cnt; in dib0090_gain_control() local
1224 wbd += dib0090_wbd_to_db(state, wbd_val); in dib0090_gain_control()
1226 wbd /= cnt; in dib0090_gain_control()
1227 wbd_error = state->wbd_target - wbd; in dib0090_gain_control()
1312 (u32) *tune_state, (u32) adc, (u32) adc_error, (u32) wbd, (u32) wbd_error, (u32) wbd_val, in dib0090_gain_control()
1346 const struct dib0090_wbd_slope *wbd = state->current_wbd_table; in dib0090_get_wbd_target() local
1348 while (f_MHz > wbd->max_freq) in dib0090_get_wbd_target()
1349 wbd++; in dib0090_get_wbd_target()
1351 dprintk("using wbd-table-entry with max freq %d\n", wbd->max_freq); in dib0090_get_wbd_target()
1359 if (wbd->wbd_gain != 0) in dib0090_get_wbd_target()
1360 state->wbdmux |= (wbd->wbd_gain << 13); in dib0090_get_wbd_target()
1366 wbd_thot = wbd->offset_hot - (((u32) wbd->slope_hot * f_MHz) >> 6); in dib0090_get_wbd_target()
1367 wbd_tcold = wbd->offset_cold - (((u32) wbd->slope_cold * f_MHz) >> 6); in dib0090_get_wbd_target()
1788 const struct dib0090_wbd_slope *wbd = state->current_wbd_table; in dib0090_wbd_calibration() local
1792 while (state->current_rf / 1000 > wbd->max_freq) in dib0090_wbd_calibration()
1793 wbd++; in dib0090_wbd_calibration()
1794 if (wbd->wbd_gain != 0) in dib0090_wbd_calibration()
1795 wbd_gain = wbd->wbd_gain; in dib0090_wbd_calibration()
2466 const struct dib0090_wbd_slope *wbd = state->current_wbd_table; in dib0090_tune() local
2468 while (state->current_rf / 1000 > wbd->max_freq) in dib0090_tune()
2469 wbd++; in dib0090_tune()
2485 if (wbd->wbd_gain != 0) in dib0090_tune()
2486 c = wbd->wbd_gain; in dib0090_tune()
2628 if (config->wbd == NULL) in dib0090_register()
2631 st->current_wbd_table = config->wbd; in dib0090_register()