Skip to content
Commit 01eb1027 authored by Gerard Marull-Paretas's avatar Gerard Marull-Paretas Committed by Carles Cufí
Browse files

sys: linear_range: initial API



This patch adds a new API to map values in a linear range to a range
index. This API is useful in the context of regulators, where it is
common that devices map regulator voltages to a set of indices with a
linear relationship.

The original idea is borrowed from Linux.

Signed-off-by: default avatarGerard Marull-Paretas <gerard.marull@nordicsemi.no>
parent 37de395f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment