diff options
author | Gene Chen <gene_chen@richtek.com> | 2021-07-19 06:39:12 +0300 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2021-08-13 19:37:38 +0300 |
commit | e12ef7bf34113f55c9bf444a680a15b6daf76f26 (patch) | |
tree | 59f202c7ba4e2cb43fbfa08663758908a4de23cf /include/linux/linear_range.h | |
parent | e73f0f0ee7541171d89f2e2491130c7771ba58d3 (diff) | |
download | linux-e12ef7bf34113f55c9bf444a680a15b6daf76f26.tar.xz |
lib: add linear range get selector within
Add linear range get selector within for choose closest selector
between minimum and maximum selector.
Signed-off-by: Gene Chen <gene_chen@richtek.com>
Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'include/linux/linear_range.h')
-rw-r--r-- | include/linux/linear_range.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/linear_range.h b/include/linux/linear_range.h index 17b5943727d5..fd3d0b358f22 100644 --- a/include/linux/linear_range.h +++ b/include/linux/linear_range.h @@ -41,6 +41,8 @@ int linear_range_get_selector_low(const struct linear_range *r, int linear_range_get_selector_high(const struct linear_range *r, unsigned int val, unsigned int *selector, bool *found); +void linear_range_get_selector_within(const struct linear_range *r, + unsigned int val, unsigned int *selector); int linear_range_get_selector_low_array(const struct linear_range *r, int ranges, unsigned int val, unsigned int *selector, bool *found); |