From ff68805c6594aef25d02f5ac866e6d6ebc61c5d8 Mon Sep 17 00:00:00 2001 From: Fenglin Wu Date: Thu, 18 Aug 2016 10:54:00 +0800 Subject: [PATCH] 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 --- drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c index b366d8018106..73547abc5cf5 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c @@ -780,7 +780,7 @@ static int pmic_mpp_populate(struct pmic_mpp_state *state, sel &= PMIC_MPP_REG_MODE_FUNCTION_MASK; 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) pad->paired = true;