summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAmit Sunil Dhamne <amitsd@google.com>2026-03-26 01:22:25 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-03-30 17:58:33 +0300
commitf23388d0f6523cc3a72edf6e78cb11931a07da10 (patch)
treec148e9dfcd69f7c93578c808dcad065868f5328f /include
parentb422f7c072ac8d9b83c3d22e03709b92626ca88a (diff)
downloadlinux-f23388d0f6523cc3a72edf6e78cb11931a07da10.tar.xz
lib/linear_ranges: Add linear_range_get_selector_high_array
Add a helper function to find the selector for a given value in a linear range array. The selector should be such that the value it represents should be higher or equal to the given value. Signed-off-by: Amit Sunil Dhamne <amitsd@google.com> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20260325-max77759-charger-v9-4-4486dd297adc@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/linear_range.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/linear_range.h b/include/linux/linear_range.h
index 2e4f4c3539c0..0f3037f1a94f 100644
--- a/include/linux/linear_range.h
+++ b/include/linux/linear_range.h
@@ -57,5 +57,8 @@ void linear_range_get_selector_within(const struct linear_range *r,
int linear_range_get_selector_low_array(const struct linear_range *r,
int ranges, unsigned int val,
unsigned int *selector, bool *found);
+int linear_range_get_selector_high_array(const struct linear_range *r,
+ int ranges, unsigned int val,
+ unsigned int *selector, bool *found);
#endif