regulator: max8973: set startup time for rail based on BIAS control
authorLaxman Dewangan <ldewangan@nvidia.com>
Thu, 23 Apr 2015 10:40:22 +0000 (16:10 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 27 Apr 2015 17:59:48 +0000 (18:59 +0100)
In MAX8973, BIAS enable control bit is used for changing the startup time
for voltage output. The startup delay is 240us (typ) when the BIASEN
bit is set to 0. The startup delay is reduced to 20us (typ) when the
BIASEN bit is set to 1.

Pass the enable_time through regulator descriptor based on this flag.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/max8973-regulator.c

index c3d55c2db593b8f37a253c4a07bd21130db99353..be9a463d73540d176a568eaa4d48efad4bca14ed 100644 (file)
@@ -266,8 +266,12 @@ static int max8973_init_dcdc(struct max8973_chip *max,
        if (pdata->control_flags & MAX8973_CONTROL_OUTPUT_ACTIVE_DISCH_ENABLE)
                control1 |= MAX8973_AD_ENABLE;
 
-       if (pdata->control_flags & MAX8973_CONTROL_BIAS_ENABLE)
+       if (pdata->control_flags & MAX8973_CONTROL_BIAS_ENABLE) {
                control1 |= MAX8973_BIAS_ENABLE;
+               max->desc.enable_time = 20;
+       } else {
+               max->desc.enable_time = 240;
+       }
 
        if (pdata->control_flags & MAX8973_CONTROL_FREQ_SHIFT_9PER_ENABLE)
                control1 |= MAX8973_FREQSHIFT_9PER;