drivers: mfd: palmas: make smps10_boost_disable optional
Matt Wagner [Tue, 11 Dec 2012 05:43:47 +0000 (21:43 -0800)]
Allow the board to pick whether they want to disable
smps10_boost on suspend

Bug 1172908

Change-Id: I0121f7e24716eb8731af3b14100d81ef63168929
Signed-off-by: Matt Wagner <mwagner@nvidia.com>
Reviewed-on: http://git-master/r/170340
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/regulator/palmas-regulator.c
include/linux/mfd/palmas.h

index c317f64..2d119e9 100644 (file)
@@ -1367,7 +1367,8 @@ static int palmas_suspend(struct device *dev)
        if (pdata->enable_ldo8_tracking && pdata->disabe_ldo8_tracking_suspend)
                palmas_disable_ldo8_track(palmas);
 
-       palmas_disable_smps10_boost(palmas);
+       if (pdata->disable_smps10_boost_suspend)
+               palmas_disable_smps10_boost(palmas);
        return 0;
 }
 
@@ -1380,7 +1381,8 @@ static int palmas_resume(struct device *dev)
        if (pdata->enable_ldo8_tracking && pdata->disabe_ldo8_tracking_suspend)
                palmas_enable_ldo8_track(palmas);
 
-       palmas_enable_smps10_boost(palmas);
+       if (pdata->disable_smps10_boost_suspend)
+               palmas_enable_smps10_boost(palmas);
        return 0;
 }
 #endif
index 75cd84a..c4bf153 100644 (file)
@@ -188,6 +188,7 @@ struct palmas_pmic_platform_data {
 
        bool enable_ldo8_tracking;
        bool disabe_ldo8_tracking_suspend;
+       bool disable_smps10_boost_suspend;
 
 
 };