mfd: madera: Fix some micbias configuration issues
authorStuart Henderson <stuarth@opensource.wolfsonmicro.com>
Fri, 2 Jun 2017 10:21:35 +0000 (11:21 +0100)
committer강신형 <s47.kang@samsung.com>
Tue, 19 Jun 2018 07:08:55 +0000 (16:08 +0900)
Change-Id: I21b851126684ef4446a763df6f180dd46dab0969
Signed-off-by: Stuart Henderson <stuarth@opensource.wolfsonmicro.com>
drivers/mfd/madera-core.c

index 1cd586e2e3da9c4a905419338593edfc23d3008d..424447b8c516f3f56c8a1ee3f24e26af9af171ce 100644 (file)
@@ -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",