Searched refs:scale_avail (Results 1 – 10 of 10) sorted by relevance
/linux-6.6.21/drivers/iio/dac/ |
D | ad5592r-base.c | 327 if (val == st->scale_avail[0][0] && in ad5592r_write_raw() 328 val2 == st->scale_avail[0][1]) in ad5592r_write_raw() 330 else if (val == st->scale_avail[1][0] && in ad5592r_write_raw() 331 val2 == st->scale_avail[1][1]) in ad5592r_write_raw() 483 st->scale_avail[0][0], st->scale_avail[0][1], in ad5592r_show_scale_available() 484 st->scale_avail[1][0], st->scale_avail[1][1]); in ad5592r_show_scale_available() 586 st->scale_avail[0][0] = in ad5592r_init_scales() 587 div_s64_rem(tmp, 1000000000LL, &st->scale_avail[0][1]); in ad5592r_init_scales() 588 st->scale_avail[1][0] = in ad5592r_init_scales() 589 div_s64_rem(tmp * 2, 1000000000LL, &st->scale_avail[1][1]); in ad5592r_init_scales()
|
D | ad5592r-base.h | 60 int scale_avail[2][2]; member
|
/linux-6.6.21/drivers/iio/adc/ |
D | mxs-lradc-adc.c | 125 struct mxs_lradc_scale scale_avail[LRADC_MAX_TOTAL_CHANS][2]; member 274 struct mxs_lradc_scale *scale_avail = in mxs_lradc_adc_write_raw() local 275 adc->scale_avail[chan->channel]; in mxs_lradc_adc_write_raw() 285 if (val == scale_avail[MXS_LRADC_DIV_DISABLED].integer && in mxs_lradc_adc_write_raw() 286 val2 == scale_avail[MXS_LRADC_DIV_DISABLED].nano) { in mxs_lradc_adc_write_raw() 290 } else if (val == scale_avail[MXS_LRADC_DIV_ENABLED].integer && in mxs_lradc_adc_write_raw() 291 val2 == scale_avail[MXS_LRADC_DIV_ENABLED].nano) { in mxs_lradc_adc_write_raw() 325 for (i = 0; i < ARRAY_SIZE(adc->scale_avail[ch]); i++) in mxs_lradc_adc_show_scale_avail() 327 adc->scale_avail[ch][i].integer, in mxs_lradc_adc_show_scale_avail() 328 adc->scale_avail[ch][i].nano); in mxs_lradc_adc_show_scale_avail() [all …]
|
D | ti-ads1100.c | 49 int scale_avail[2 * 4]; /* 4 gain settings */ member 180 for (i = 0; i < ARRAY_SIZE(data->scale_avail) / 2; i++) { in ads1100_calc_scale_avail() 181 data->scale_avail[i * 2 + 0] = millivolts; in ads1100_calc_scale_avail() 182 data->scale_avail[i * 2 + 1] = 15 + i; in ads1100_calc_scale_avail() 207 *vals = data->scale_avail; in ads1100_read_avail() 208 *length = ARRAY_SIZE(data->scale_avail); in ads1100_read_avail()
|
D | nau7802.c | 60 u32 scale_avail[8]; member 88 for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) in nau7802_show_scales() 90 st->scale_avail[i]); in nau7802_show_scales() 369 for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) in nau7802_write_raw() 370 if (val2 == st->scale_avail[i]) in nau7802_write_raw() 478 for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) in nau7802_probe() 479 st->scale_avail[i] = (((u64)st->vref_mv) * 1000000000ULL) in nau7802_probe()
|
D | max11410.c | 124 u32 *scale_avail; member 516 u32 *scale_avail; in max11410_write_raw() local 520 scale_avail = st->channels[chan->address].scale_avail; in max11410_write_raw() 521 if (!scale_avail) in max11410_write_raw() 534 val2 = DIV_ROUND_CLOSEST(scale_avail[0], val2); in max11410_write_raw() 603 if (!cfg.scale_avail) in max11410_read_avail() 606 *vals = cfg.scale_avail; in max11410_read_avail() 793 cfg->scale_avail = devm_kcalloc(dev, MAX11410_SCALE_AVAIL_SIZE * 2, in max11410_parse_channels() 794 sizeof(*cfg->scale_avail), in max11410_parse_channels() 796 if (!cfg->scale_avail) { in max11410_parse_channels() [all …]
|
D | ad7793.c | 159 u32 scale_avail[8][2]; member 330 for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) { in ad7793_setup() 336 st->scale_avail[i][1] = do_div(scale_uv, 100000000) * 10; in ad7793_setup() 337 st->scale_avail[i][0] = scale_uv; in ad7793_setup() 367 *vals = (int *)st->scale_avail; in ad7793_read_avail() 370 *length = ARRAY_SIZE(st->scale_avail) * 2; in ad7793_read_avail() 420 scale_avail[(st->conf >> 8) & 0x7][0]; in ad7793_read_raw() 422 scale_avail[(st->conf >> 8) & 0x7][1]; in ad7793_read_raw() 482 for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) in ad7793_write_raw() 483 if (val2 == st->scale_avail[i][1]) { in ad7793_write_raw()
|
D | ad7192.c | 187 u32 scale_avail[8][2]; member 456 for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) { in ad7192_setup() 462 st->scale_avail[i][1] = do_div(scale_uv, 100000000) * 10; in ad7192_setup() 463 st->scale_avail[i][0] = scale_uv; in ad7192_setup() 695 *val = st->scale_avail[AD7192_CONF_GAIN(st->conf)][0]; in ad7192_read_raw() 696 *val2 = st->scale_avail[AD7192_CONF_GAIN(st->conf)][1]; in ad7192_read_raw() 746 for (i = 0; i < ARRAY_SIZE(st->scale_avail); i++) in ad7192_write_raw() 747 if (val2 == st->scale_avail[i][1]) { in ad7192_write_raw() 814 *vals = (int *)st->scale_avail; in ad7192_read_avail() 817 *length = ARRAY_SIZE(st->scale_avail) * 2; in ad7192_read_avail()
|
D | ad7606.c | 192 *val2 = st->scale_avail[st->range[ch]]; in ad7606_read_raw() 223 return ad7606_show_avail(buf, st->scale_avail, st->num_scales, true); in in_voltage_scale_available_show() 266 i = find_closest(val2, st->scale_avail, st->num_scales); in ad7606_write_raw() 582 st->scale_avail = ad7606_scale_avail; in ad7606_probe() 638 st->scale_avail = ad7616_sw_scale_avail; in ad7606_probe()
|
D | ad7606.h | 99 const unsigned int *scale_avail; member
|