diff options
| author | Stephen Boyd <sboyd@codeaurora.org> | 2015-07-17 17:41:54 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2015-07-24 13:28:46 -0400 |
| commit | 3a003baeec246f604ed1d2e0087560d7f15edcc6 (patch) | |
| tree | 6b9e16f35e605a1b23386be578df569b599e978b /include | |
| parent | bc0195aad0daa2ad5b0d76cce22b167bc3435590 (diff) | |
regulator: Add over current protection (OCP) support
Some regulators can automatically shut down when they detect an
over current event. Add an op (set_over_current_protection) and a
DT property + constraint to support this capability.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/regulator/driver.h | 1 | ||||
| -rw-r--r-- | include/linux/regulator/machine.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 4db9fbe4889d..45932228cbf5 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -148,6 +148,7 @@ struct regulator_ops { | |||
| 148 | int (*get_current_limit) (struct regulator_dev *); | 148 | int (*get_current_limit) (struct regulator_dev *); |
| 149 | 149 | ||
| 150 | int (*set_input_current_limit) (struct regulator_dev *, int lim_uA); | 150 | int (*set_input_current_limit) (struct regulator_dev *, int lim_uA); |
| 151 | int (*set_over_current_protection) (struct regulator_dev *); | ||
| 151 | 152 | ||
| 152 | /* enable/disable regulator */ | 153 | /* enable/disable regulator */ |
| 153 | int (*enable) (struct regulator_dev *); | 154 | int (*enable) (struct regulator_dev *); |
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index b11be1260129..a1067d0b3991 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
| @@ -147,6 +147,7 @@ struct regulation_constraints { | |||
| 147 | unsigned ramp_disable:1; /* disable ramp delay */ | 147 | unsigned ramp_disable:1; /* disable ramp delay */ |
| 148 | unsigned soft_start:1; /* ramp voltage slowly */ | 148 | unsigned soft_start:1; /* ramp voltage slowly */ |
| 149 | unsigned pull_down:1; /* pull down resistor when regulator off */ | 149 | unsigned pull_down:1; /* pull down resistor when regulator off */ |
| 150 | unsigned over_current_protection:1; /* auto disable on over current */ | ||
| 150 | }; | 151 | }; |
| 151 | 152 | ||
| 152 | /** | 153 | /** |
