]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mfd: wm5110: Add register patch for rev E and above
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tue, 7 Jul 2015 14:28:13 +0000 (15:28 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 8 Jul 2015 19:22:56 +0000 (20:22 +0100)
Add a register patch for rev E and above that configures the location of
some write sequences to assist with the headphone enables.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/mfd/wm5110-tables.c

index 62a4aa13cb98f657668a642a89d5932be23d9788..e08924261fef3602cabc122bbd4ae91f16f18ee0 100644 (file)
@@ -249,6 +249,16 @@ static const struct reg_default wm5110_revd_patch[] = {
        { 0x80, 0x0 },
 };
 
+/* Add extra headphone write sequence locations */
+static const struct reg_default wm5110_reve_patch[] = {
+       { 0x80, 0x3 },
+       { 0x80, 0x3 },
+       { 0x4b, 0x138 },
+       { 0x4c, 0x13d },
+       { 0x80, 0x0 },
+       { 0x80, 0x0 },
+};
+
 /* We use a function so we can use ARRAY_SIZE() */
 int wm5110_patch(struct arizona *arizona)
 {
@@ -266,7 +276,9 @@ int wm5110_patch(struct arizona *arizona)
                                             wm5110_revd_patch,
                                             ARRAY_SIZE(wm5110_revd_patch));
        default:
-               return 0;
+               return regmap_register_patch(arizona->regmap,
+                                            wm5110_reve_patch,
+                                            ARRAY_SIZE(wm5110_reve_patch));
        }
 }
 EXPORT_SYMBOL_GPL(wm5110_patch);