diff options
| author | Stephen Boyd <sboyd@codeaurora.org> | 2015-06-11 20:37:04 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2015-06-12 08:09:43 -0400 |
| commit | 23c779b9f9161d6568d3b2fca06e70ad182c480c (patch) | |
| tree | 314598f81db70f24dc8ead5f84c708cb8d5f00ef /include/linux/regulator | |
| parent | 22a10bca280073f81e9e2d9fed6f90a3bcf00236 (diff) | |
regulator: Add pull down support
Some regulators need to be configured to pull down a resistor
when the regulator is disabled. Add an op (set_pull_down) 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')
| -rw-r--r-- | include/linux/regulator/driver.h | 5 | ||||
| -rw-r--r-- | include/linux/regulator/machine.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index fffa688ac3a7..76144a337ff7 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -121,6 +121,9 @@ struct regulator_linear_range { | |||
| 121 | * @set_suspend_mode: Set the operating mode for the regulator when the | 121 | * @set_suspend_mode: Set the operating mode for the regulator when the |
| 122 | * system is suspended. | 122 | * system is suspended. |
| 123 | * | 123 | * |
| 124 | * @set_pull_down: Configure the regulator to pull down when the regulator | ||
| 125 | * is disabled. | ||
| 126 | * | ||
| 124 | * This struct describes regulator operations which can be implemented by | 127 | * This struct describes regulator operations which can be implemented by |
| 125 | * regulator chip drivers. | 128 | * regulator chip drivers. |
| 126 | */ | 129 | */ |
| @@ -187,6 +190,8 @@ struct regulator_ops { | |||
| 187 | 190 | ||
| 188 | /* set regulator suspend operating mode (defined in consumer.h) */ | 191 | /* set regulator suspend operating mode (defined in consumer.h) */ |
| 189 | int (*set_suspend_mode) (struct regulator_dev *, unsigned int mode); | 192 | int (*set_suspend_mode) (struct regulator_dev *, unsigned int mode); |
| 193 | |||
| 194 | int (*set_pull_down) (struct regulator_dev *); | ||
| 190 | }; | 195 | }; |
| 191 | 196 | ||
| 192 | /* | 197 | /* |
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 01526559c8c3..8ffb0619a03c 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
| @@ -87,6 +87,7 @@ struct regulator_state { | |||
| 87 | * applied. | 87 | * applied. |
| 88 | * @apply_uV: Apply the voltage constraint when initialising. | 88 | * @apply_uV: Apply the voltage constraint when initialising. |
| 89 | * @ramp_disable: Disable ramp delay when initialising or when setting voltage. | 89 | * @ramp_disable: Disable ramp delay when initialising or when setting voltage. |
| 90 | * @pull_down: Enable pull down when regulator is disabled. | ||
| 90 | * | 91 | * |
| 91 | * @input_uV: Input voltage for regulator when supplied by another regulator. | 92 | * @input_uV: Input voltage for regulator when supplied by another regulator. |
| 92 | * | 93 | * |
| @@ -141,6 +142,7 @@ struct regulation_constraints { | |||
| 141 | unsigned boot_on:1; /* bootloader/firmware enabled regulator */ | 142 | unsigned boot_on:1; /* bootloader/firmware enabled regulator */ |
| 142 | unsigned apply_uV:1; /* apply uV constraint if min == max */ | 143 | unsigned apply_uV:1; /* apply uV constraint if min == max */ |
| 143 | unsigned ramp_disable:1; /* disable ramp delay */ | 144 | unsigned ramp_disable:1; /* disable ramp delay */ |
| 145 | unsigned pull_down:1; /* pull down resistor when regulator off */ | ||
| 144 | }; | 146 | }; |
| 145 | 147 | ||
| 146 | /** | 148 | /** |
