]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
regulator: max77802: Document binding for regulator operating modes
authorJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Tue, 11 Nov 2014 12:04:43 +0000 (13:04 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 26 Nov 2014 19:42:47 +0000 (19:42 +0000)
Some regulators from the max77802 PMIC support to be configured in one
of two operating mode: Output ON (normal) and Output On Low Power Mode.
Not all regulators support these two modes and for some of them, the
mode can be changed while the system is running in normal operation
while others only support their mode to be changed on system suspend.

Extend the max77802 PMIC binding by documenting the possible operating
modes values so the regulators modes can be configured correctly.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/regulator/max77802.txt

index 5aeaffc0f1f0d415500b21a1bebb9bf2fb327fe3..79e5476444f7b4c47a75bed4659c44dffb7576e2 100644 (file)
@@ -25,6 +25,29 @@ with their hardware counterparts as follow. The valid names are:
                        example: LDO1, LDO2, LDO35.
        -BUCKn  :       for BUCKs, where n can lie in range 1 to 10.
                        example: BUCK1, BUCK5, BUCK10.
+
+The max77802 regulator supports two different operating modes: Normal and Low
+Power Mode. Some regulators support the modes to be changed at startup or by
+the consumers during normal operation while others only support to change the
+mode during system suspend. The standard regulator suspend states binding can
+be used to configure the regulator operating mode.
+
+The regulators that support the standard "regulator-initial-mode" property,
+changing their mode during normal operation are: LDOs 1, 3, 20 and 21.
+
+The possible values for "regulator-initial-mode" and "regulator-mode" are:
+       1: Normal regulator voltage output mode.
+       3: Low Power which reduces the quiescent current down to only 1uA
+
+The list of valid modes are defined in the dt-bindings/clock/maxim,max77802.h
+header and can be included by device tree source files.
+
+The standard "regulator-mode" property can only be used for regulators that
+support changing their mode to Low Power Mode during suspend. These regulators
+are: BUCKs 2-4 and LDOs 1-35. Also, it only takes effect if the regulator has
+been enabled for the given suspend state using "regulator-on-in-suspend" and
+has not been disabled for that state using "regulator-off-in-suspend".
+
 Example:
 
        max77802@09 {
@@ -36,11 +59,23 @@ Example:
                #size-cells = <0>;
 
                regulators {
+                       ldo1_reg: LDO1 {
+                               regulator-name = "vdd_1v0";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                               regulator-initial-mode = <MAX77802_OPMODE_LP>;
+                       };
+
                        ldo11_reg: LDO11 {
                                regulator-name = "vdd_ldo11";
                                regulator-min-microvolt = <1900000>;
                                regulator-max-microvolt = <1900000>;
                                regulator-always-on;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-mode = <MAX77802_OPMODE_LP>;
+                               };
                        };
 
                        buck1_reg: BUCK1 {