diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-06-11 17:37:06 -0700 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-06-12 13:18:02 +0100 |
commit | 36e4f839de59b6216a16cdf5c1d3263f4dbd9421 (patch) | |
tree | 5cf5ebd741a210f610ec32ae3a1d1d953c553fe6 /include/linux/regulator/driver.h | |
parent | 57f66b78860968fc7eddc9ce25f8e57f7e5000bd (diff) | |
download | linux-36e4f839de59b6216a16cdf5c1d3263f4dbd9421.tar.gz linux-36e4f839de59b6216a16cdf5c1d3263f4dbd9421.tar.bz2 linux-36e4f839de59b6216a16cdf5c1d3263f4dbd9421.zip |
regulator: Add input current limit support
Some regulators can limit their input current (typically annotated
as ilim). Add an op (set_input_current_limit) and a DT property +
constraint to support this.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator/driver.h')
-rw-r--r-- | include/linux/regulator/driver.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index e0635d0894aa..125264f8be93 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -91,6 +91,7 @@ struct regulator_linear_range { * @set_current_limit: Configure a limit for a current-limited regulator. * The driver should select the current closest to max_uA. * @get_current_limit: Get the configured limit for a current-limited regulator. + * @set_input_current_limit: Configure an input limit. * * @set_mode: Set the configured operating mode for the regulator. * @get_mode: Get the configured operating mode for the regulator. @@ -145,6 +146,8 @@ struct regulator_ops { int min_uA, int max_uA); int (*get_current_limit) (struct regulator_dev *); + int (*set_input_current_limit) (struct regulator_dev *, int lim_uA); + /* enable/disable regulator */ int (*enable) (struct regulator_dev *); int (*disable) (struct regulator_dev *); |