regulator: added support for suspend states
authorChunyan Zhang <zhang.chunyan@linaro.org>
Fri, 26 Jan 2018 13:08:43 +0000 (21:08 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 26 Jan 2018 14:43:42 +0000 (14:43 +0000)
Some systems need to set regulators to specific states when they enter
low power modes, especially around CPUs. There are many of these modes
depending on the particular runtime state.

Currently the regulator consumers are not granted permission to change
suspend state of regulator devices, the constraints are configured at
startup.  In order to allow changes in a vlotage range, we need to add
new properties for voltage range and a flag to give permission to
change the suspend voltage and suspend on/off in suspend mode.

Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/regulator/regulator.txt

index 378f6dc8b8bd102b64cbf477aa203c41115d9b00..e459226dfac9e721b9921e5c29155fa9dd0d7b27 100644 (file)
@@ -42,8 +42,16 @@ Optional properties:
 - regulator-state-[mem/disk] node has following common properties:
        - regulator-on-in-suspend: regulator should be on in suspend state.
        - regulator-off-in-suspend: regulator should be off in suspend state.
-       - regulator-suspend-microvolt: regulator should be set to this voltage
-         in suspend.
+       - regulator-suspend-min-microvolt: minimum voltage may be set in
+         suspend state.
+       - regulator-suspend-max-microvolt: maximum voltage may be set in
+         suspend state.
+       - regulator-suspend-microvolt: the default voltage which regulator
+         would be set in suspend. This property is now deprecated, instead
+         setting voltage for suspend mode via the API which regulator
+         driver provides is recommended.
+       - regulator-changeable-in-suspend: whether the default voltage and
+         the regulator on/off in suspend can be changed in runtime.
        - regulator-mode: operating mode in the given suspend state.
          The set of possible operating modes depends on the capabilities of
          every hardware so the valid modes are documented on each regulator