regulator: tps62360: Fix off-by-one shift for ramp_ctrl
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / regulator / tps62360-regulator.c
index acbd63fde4153fb7ffe9cf3a8b22dd25aad43383..612919c3081cafd1a46d010787a97dd3e7d49e62 100644 (file)
@@ -278,7 +278,7 @@ static int tps62360_init_dcdc(struct tps62360_chip *tps,
                        __func__, REG_RAMPCTRL, ret);
                return ret;
        }
-       ramp_ctrl = (ramp_ctrl >> 4) & 0x7;
+       ramp_ctrl = (ramp_ctrl >> 5) & 0x7;
 
        /* ramp mV/us = 32/(2^ramp_ctrl) */
        tps->desc.ramp_delay = DIV_ROUND_UP(32000, BIT(ramp_ctrl));