Home
last modified time | relevance | path

Searched refs:find_closest (Results 1 – 18 of 18) sorted by relevance

/openbmc/linux/drivers/watchdog/
H A Dsimatic-ipc-wdt.c85 int timeout_idx = find_closest(t, wd_timeout_table, in wd_set_timeout()
128 timeout_idx = find_closest(TIMEOUT_DEF, wd_timeout_table, in wd_setup()
/openbmc/linux/drivers/iio/adc/
H A Dina2xx-adc.c296 bits = find_closest(val, ina226_avg_tab, in ina226_set_average()
319 bits = find_closest(val_us, ina226_conv_time_tab, in ina226_set_int_time_vbus()
338 bits = find_closest(val_us, ina226_conv_time_tab, in ina226_set_int_time_vshunt()
360 *bits = find_closest(*val_us, ina219_conv_time_tab_subsample, in ina219_lookup_int_time()
364 *bits = find_closest(*val_us, ina219_conv_time_tab_average, in ina219_lookup_int_time()
440 bits = find_closest(gain, ina219_vshunt_gain_tab, in ina219_set_vshunt_pga_gain()
H A Dad7606.c242 i = find_closest(val2, st->scale_avail, st->num_scales); in ad7606_write_raw()
257 i = find_closest(val, st->oversampling_avail, in ad7606_write_raw()
H A Drtq6056.c259 selector = find_closest(val, rtq6056_avg_sample_list, in rtq6056_adc_set_average()
/openbmc/linux/include/linux/
H A Dutil_macros.h29 #define find_closest(x, a, as) __find_closest(x, a, as, <=) macro
/openbmc/linux/drivers/hwmon/
H A Dina3221.c396 idx = find_closest(val, ina3221_avg_samples, in ina3221_write_chip()
410 idx = find_closest(tmp, ina3221_conv_time, in ina3221_write_chip()
H A Dtc654.c422 val = find_closest(val, tc654_pwm_map, ARRAY_SIZE(tc654_pwm_map)) + 1; in pwm_store()
H A Dmax31760.c292 pwm_index = find_closest(val, max31760_pwm_freq, in max31760_write()
H A Dina2xx.c175 avg_bits = find_closest(avg, ina226_avg_tab, in ina226_interval_to_reg()
H A Dlm75.c424 index = find_closest(val, data->params->sample_times, in lm75_update_interval()
H A Dlm85.c182 return find_closest(range, lm85_range_map, ARRAY_SIZE(lm85_range_map)); in RANGE_TO_REG()
203 return find_closest(freq, map, map_size); in FREQ_TO_REG()
H A Dadt7475.c682 val = find_closest(val, autorange_table, ARRAY_SIZE(autorange_table)); in point2_store()
997 out = find_closest(val, pwmfreq_table, ARRAY_SIZE(pwmfreq_table)); in pwmfreq_store()
H A Dadt7470.c789 index = find_closest(freq, adt7470_freq_map, in pwm1_freq_set()
/openbmc/linux/drivers/regulator/
H A Dmax77857-regulator.c386 switch_freq = find_closest(switch_freq, max77857_switch_freq, in max77857_probe()
/openbmc/linux/drivers/iio/light/
H A Dvl6180.c371 i = find_closest(gain, vl6180_als_gain_tab, in vl6180_set_als_gain()
H A Dmax44000.c368 int alspga = find_closest(valus, in max44000_write_raw()
H A Dsi1133.c665 scale_integer = find_closest(scale_integer, si1133_scale_available, in si1133_scale_to_swgain()
/openbmc/linux/drivers/hwmon/pmbus/
H A Dmax20730.c511 idx = find_closest(direct_to_val(word, PSC_CURRENT_OUT, info), in max20730_write_word_data()