diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-10-10 21:32:18 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-11 07:49:16 -0400 |
commit | 8828bae464b129abed95b748263f1ab53bdc5755 (patch) | |
tree | 505148f6e9ed7a89a238cc8f1b3042e459f7c703 /include | |
parent | e277e656804c85a0729d4fd8cdd3c8ab3e6b3b86 (diff) |
regulator: Add REGULATOR_LINEAR_RANGE macro
Add REGULATOR_LINEAR_RANGE macro and convert regulator drivers to use it.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/regulator/driver.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 997ff5c4d880..edb11b716dd3 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -57,6 +57,15 @@ struct regulator_linear_range { | |||
57 | unsigned int uV_step; | 57 | unsigned int uV_step; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | /* Initialize struct regulator_linear_range */ | ||
61 | #define REGULATOR_LINEAR_RANGE(_min_uV, _min_sel, _max_sel, _step_uV) \ | ||
62 | { \ | ||
63 | .min_uV = _min_uV, \ | ||
64 | .min_sel = _min_sel, \ | ||
65 | .max_sel = _max_sel, \ | ||
66 | .uV_step = _step_uV, \ | ||
67 | } | ||
68 | |||
60 | /** | 69 | /** |
61 | * struct regulator_ops - regulator operations. | 70 | * struct regulator_ops - regulator operations. |
62 | * | 71 | * |