mfd: pm8xxx-pwm: Correct the order of bank selection and update

The existing operational sequence to enable PWM/LPG mode is incorrect,
that is, it enables the LPG bank before selecting it. Correct the
sequence by changing the order so that we select the bank first and
then enable it.

Change-Id: Ic56fb7342ff5a7bf569d2809cce75419fe0d8de4
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
diff --git a/drivers/mfd/pm8xxx-pwm.c b/drivers/mfd/pm8xxx-pwm.c
index 022cfb6..70f4cd5 100644
--- a/drivers/mfd/pm8xxx-pwm.c
+++ b/drivers/mfd/pm8xxx-pwm.c
@@ -815,8 +815,8 @@
 		if (pwm_chip->is_lpg_supported) {
 			if (pwm->dtest_mode_supported)
 				pm8xxx_pwm_set_dtest(pwm, 1);
-			rc = pm8xxx_pwm_bank_enable(pwm, 1);
 			pm8xxx_pwm_bank_sel(pwm);
+			rc = pm8xxx_pwm_bank_enable(pwm, 1);
 			pm8xxx_pwm_start(pwm, 1, 0);
 		} else {
 			pm8xxx_pwm_enable(pwm);
@@ -1065,9 +1065,9 @@
 		if (pwm->dtest_mode_supported)
 			pm8xxx_pwm_set_dtest(pwm, 1);
 
+		pm8xxx_pwm_bank_sel(pwm);
 		pm8xxx_pwm_bank_enable(pwm, 1);
 
-		pm8xxx_pwm_bank_sel(pwm);
 		pm8xxx_pwm_start(pwm, 1, 1);
 	} else {
 		if (pwm->dtest_mode_supported)