diff options
| author | Sebastian Reichel <sebastian.reichel@collabora.com> | 2022-09-16 22:34:19 +0200 |
|---|---|---|
| committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2022-09-16 22:34:19 +0200 |
| commit | 3d568b4f4b1880b57605305f59afe644c1f383a6 (patch) | |
| tree | 5dd7e4e6782d70e31f0cbe46b9cd7ba767188261 | |
| parent | 55cafd4ba42cf495268f955dd38e277fc4b4381e (diff) | |
| parent | c2f2e2c3aecdbabf822272a4b6e7d91537633cd9 (diff) | |
Merge tag 'psy-linear-range-for-v6.1-signed' into psy-next
Immutable branch between linear range and power-supply for driver
changes in MT6370.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
| -rw-r--r-- | include/linux/linear_range.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/linear_range.h b/include/linux/linear_range.h index fd3d0b358f22..2e4f4c3539c0 100644 --- a/include/linux/linear_range.h +++ b/include/linux/linear_range.h @@ -26,6 +26,17 @@ struct linear_range { unsigned int step; }; +#define LINEAR_RANGE(_min, _min_sel, _max_sel, _step) \ + { \ + .min = _min, \ + .min_sel = _min_sel, \ + .max_sel = _max_sel, \ + .step = _step, \ + } + +#define LINEAR_RANGE_IDX(_idx, _min, _min_sel, _max_sel, _step) \ + [_idx] = LINEAR_RANGE(_min, _min_sel, _max_sel, _step) + unsigned int linear_range_values_in_range(const struct linear_range *r); unsigned int linear_range_values_in_range_array(const struct linear_range *r, int ranges); |
