regulator: mfd: configure ext control of SMPS3 for SMPS123 config
Laxman Dewangan [Thu, 27 Sep 2012 12:46:18 +0000 (17:46 +0530)]
If SMPS123 configuration is used and if it is controlled by external
control then configure SMPS3 ext control along with SMPS12.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/139389
(cherry picked from commit f6907f72fcf37adb5cdc669974b2714b8d64c656)

Change-Id: I86f22ce873bbb36e38e7a25abb9f33fee6691eaa
Signed-off-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
Reviewed-on: http://git-master/r/146382
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

drivers/regulator/palmas-regulator.c

index 0b1163d..1e1b204 100644 (file)
@@ -805,6 +805,17 @@ static int palmas_smps_init(struct palmas *palmas, int id,
                                "Error in configuring external control\n");
                        return ret;
                }
+
+               if (id == PALMAS_REG_SMPS123) {
+                       ret = palmas_ext_power_req_config(palmas,
+                                       PALMAS_SLEEP_REQSTR_ID_SMPS3,
+                                       reg_init->roof_floor, true);
+                       if (ret < 0) {
+                               dev_err(palmas->dev,
+                                       "Error in configuring ext control\n");
+                               return ret;
+                       }
+               }
        }
 
        if (palmas_regs_info[id].tstep_addr && reg_init->tstep) {