Lines Matching defs:wbd
882 static s16 dib0090_wbd_to_db(struct dib0090_state *state, u16 wbd)
884 wbd &= 0x3ff;
885 if (wbd < state->wbd_offset)
886 wbd = 0;
888 wbd -= state->wbd_offset;
890 return -640 + (s16) slopes_to_scale(dib0090_wbd_slopes, ARRAY_SIZE(dib0090_wbd_slopes), wbd);
909 dprintk("wbd-target: %d dB\n", (u32) state->wbd_target);
1200 s16 wbd = 0, i, cnt;
1212 wbd += dib0090_wbd_to_db(state, wbd_val);
1214 wbd /= cnt;
1215 wbd_error = state->wbd_target - wbd;
1300 (u32) *tune_state, (u32) adc, (u32) adc_error, (u32) wbd, (u32) wbd_error, (u32) wbd_val,
1334 const struct dib0090_wbd_slope *wbd = state->current_wbd_table;
1336 while (f_MHz > wbd->max_freq)
1337 wbd++;
1339 dprintk("using wbd-table-entry with max freq %d\n", wbd->max_freq);
1347 if (wbd->wbd_gain != 0)
1348 state->wbdmux |= (wbd->wbd_gain << 13);
1354 wbd_thot = wbd->offset_hot - (((u32) wbd->slope_hot * f_MHz) >> 6);
1355 wbd_tcold = wbd->offset_cold - (((u32) wbd->slope_cold * f_MHz) >> 6);
1360 dprintk("wbd-target: %d dB\n", (u32) state->wbd_target);
1361 dprintk("wbd offset applied is %d\n", wbd_tcold);
1587 state->calibrate = DC_CAL | WBD_CAL | TEMP_CAL; /* enable iq-offset-calibration and wbd-calibration when tuning next time */
1779 const struct dib0090_wbd_slope *wbd = state->current_wbd_table;
1783 while (state->current_rf / 1000 > wbd->max_freq)
1784 wbd++;
1785 if (wbd->wbd_gain != 0)
1786 wbd_gain = wbd->wbd_gain;
2457 const struct dib0090_wbd_slope *wbd = state->current_wbd_table;
2459 while (state->current_rf / 1000 > wbd->max_freq)
2460 wbd++;
2476 if (wbd->wbd_gain != 0)
2477 c = wbd->wbd_gain;
2619 if (config->wbd == NULL)
2622 st->current_wbd_table = config->wbd;