Lines Matching refs:ch_data
282 struct ad3552r_ch_data ch_data[AD3552R_MAX_CH]; member
484 *val = dac->ch_data[ch].scale_int; in ad3552r_read_raw()
485 *val2 = dac->ch_data[ch].scale_dec; in ad3552r_read_raw()
488 *val = dac->ch_data[ch].offset_int; in ad3552r_read_raw()
489 *val2 = dac->ch_data[ch].offset_dec; in ad3552r_read_raw()
735 common = 2575 * dac->ch_data[i].rfb; in ad3552r_get_custom_range()
736 offset = dac->ch_data[i].gain_offset; in ad3552r_get_custom_range()
738 gn = gains_scaling_table[dac->ch_data[i].n]; in ad3552r_get_custom_range()
743 gp = gains_scaling_table[dac->ch_data[i].p]; in ad3552r_get_custom_range()
754 if (dac->ch_data[ch].range_override) { in ad3552r_calc_gain_and_offset()
758 idx = dac->ch_data[ch].range; in ad3552r_calc_gain_and_offset()
774 dac->ch_data[ch].scale_int = div_s64_rem(span, 65536, &rem); in ad3552r_calc_gain_and_offset()
776 dac->ch_data[ch].scale_dec = DIV_ROUND_CLOSEST((s64)rem * 1000000, in ad3552r_calc_gain_and_offset()
779 dac->ch_data[ch].offset_int = div_s64_rem(v_min * 65536, span, &rem); in ad3552r_calc_gain_and_offset()
781 dac->ch_data[ch].offset_dec = div_s64(tmp, span); in ad3552r_calc_gain_and_offset()
814 dac->ch_data[ch].range_override = 1; in ad3552r_configure_custom_gain()
822 dac->ch_data[ch].p = val; in ad3552r_configure_custom_gain()
829 dac->ch_data[ch].n = val; in ad3552r_configure_custom_gain()
835 dac->ch_data[ch].rfb = val; in ad3552r_configure_custom_gain()
841 dac->ch_data[ch].gain_offset = val; in ad3552r_configure_custom_gain()
947 dac->ch_data[ch].range = val; in ad3552r_configure_device()