Lines Matching refs:selector
87 int linear_range_get_value(const struct linear_range *r, unsigned int selector, in linear_range_get_value() argument
90 if (r->min_sel > selector || r->max_sel < selector) in linear_range_get_value()
93 *val = r->min + (selector - r->min_sel) * r->step; in linear_range_get_value()
112 unsigned int selector, unsigned int *val) in linear_range_get_value_array() argument
117 if (r[i].min_sel <= selector && r[i].max_sel >= selector) in linear_range_get_value_array()
118 return linear_range_get_value(&r[i], selector, val); in linear_range_get_value_array()
139 unsigned int val, unsigned int *selector, in linear_range_get_selector_low() argument
148 *selector = r->max_sel; in linear_range_get_selector_low()
155 *selector = r->min_sel; in linear_range_get_selector_low()
157 *selector = (val - r->min) / r->step + r->min_sel; in linear_range_get_selector_low()
184 unsigned int *selector, bool *found) in linear_range_get_selector_low_array() argument
192 tmpret = linear_range_get_selector_low(&r[i], val, selector, in linear_range_get_selector_low_array()
220 unsigned int val, unsigned int *selector, in linear_range_get_selector_high() argument
229 *selector = r->min_sel; in linear_range_get_selector_high()
236 *selector = r->max_sel; in linear_range_get_selector_high()
238 *selector = DIV_ROUND_UP(val - r->min, r->step) + r->min_sel; in linear_range_get_selector_high()
256 unsigned int val, unsigned int *selector) in linear_range_get_selector_within() argument
259 *selector = r->min_sel; in linear_range_get_selector_within()
264 *selector = r->max_sel; in linear_range_get_selector_within()
269 *selector = r->min_sel; in linear_range_get_selector_within()
271 *selector = (val - r->min) / r->step + r->min_sel; in linear_range_get_selector_within()