pinctrl: qcom: spmi-mpp: Correct DTEST rail calculation

The DTEST1 rail selection value in the MODE_CTL register is not 0. Use
the proper offset value when calculating the value to write into the
MODE_CTL register.

Change-Id: Ia09aa072116d244abdd7ad0d92cc55e0aeba8efc
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
This commit is contained in:
Fenglin Wu 2016-08-18 10:54:00 +08:00
parent f0629e4f28
commit ff68805c65

View file

@ -780,7 +780,7 @@ static int pmic_mpp_populate(struct pmic_mpp_state *state,
sel &= PMIC_MPP_REG_MODE_FUNCTION_MASK; sel &= PMIC_MPP_REG_MODE_FUNCTION_MASK;
if (sel >= PMIC_MPP_SELECTOR_DTEST_FIRST) if (sel >= PMIC_MPP_SELECTOR_DTEST_FIRST)
pad->dtest = sel + 1; pad->dtest = sel - PMIC_MPP_SELECTOR_DTEST_FIRST + 1;
else if (sel == PMIC_MPP_SELECTOR_PAIRED) else if (sel == PMIC_MPP_SELECTOR_PAIRED)
pad->paired = true; pad->paired = true;