]> git.hungrycats.org Git - linux/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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 12 Nov 2015 13:09:08 +0000 (14:09 +0100)
commit 81207880cef207cd89db863f9aa1d65f22b4f2a2 upstream.

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>
Cc: Oliver Neukum <ONeukum@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/mfd/wm5110-tables.c

index f1854d5aa55feef16e022f4b8a32a2286fc48275..154e4cadecf6d18e2437528cc3efd35fc01e1b3c 100644 (file)
@@ -248,6 +248,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)
 {
@@ -265,7 +275,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);