From: Stuart Henderson Date: Fri, 2 Jun 2017 10:21:35 +0000 (+0100) Subject: mfd: madera: Fix some micbias configuration issues X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dc951541d4b4b56a063b13792e2d45e9ed7f8e12;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mfd: madera: Fix some micbias configuration issues Change-Id: I21b851126684ef4446a763df6f180dd46dab0969 Signed-off-by: Stuart Henderson --- diff --git a/drivers/mfd/madera-core.c b/drivers/mfd/madera-core.c index 1cd586e2e3da..424447b8c516 100644 --- a/drivers/mfd/madera-core.c +++ b/drivers/mfd/madera-core.c @@ -499,7 +499,7 @@ static void madera_configure_micbias(struct madera *madera) } if (mask) { - reg = MADERA_MIC_BIAS_CTRL_5 + (i * 4); + reg = MADERA_MIC_BIAS_CTRL_5 + (i * 2); ret = regmap_update_bits(madera->regmap, reg, mask, val); if (ret) dev_warn(madera->dev, @@ -520,7 +520,7 @@ static void madera_configure_micbias(struct madera *madera) MADERA_MICB1_BYPASS | MADERA_MICB1_RATE; if (!init_data->constraints.max_uV) - init_data->constraints.max_uV = 2800; + init_data->constraints.max_uV = 2800000; val = (init_data->constraints.max_uV - 1500000) / 100000; val <<= MADERA_MICB1_LVL_SHIFT; @@ -543,7 +543,7 @@ static void madera_configure_micbias(struct madera *madera) REGULATOR_CHANGE_BYPASS) val |= MADERA_MICB1_BYPASS; - reg = MADERA_MIC_BIAS_CTRL_1 + (i * 4); + reg = MADERA_MIC_BIAS_CTRL_1 + i; ret = regmap_update_bits(madera->regmap, reg, mask, val); if (ret) dev_warn(madera->dev, "Failed to write 0x%x (%d)\n",