mfd: wm5102: Add tuning for revision B
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 2 Dec 2012 02:41:47 +0000 (11:41 +0900)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 2 Dec 2012 23:36:44 +0000 (00:36 +0100)
Evaluation of revision B of WM5102 suggests updates to the register patch
for optimal performance, and make this the default behaviour for new
devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/wm5102-tables.c

index ccbdd58cf9be0485c31aa577c6ee276253fe3b5b..005de63d01d63eac348dcca97334867a7cad6bda 100644 (file)
@@ -573,6 +573,18 @@ static const struct reg_default wm5102_reva_patch[] = {
        { 0x80, 0x0000 },
 };
 
+static const struct reg_default wm5102_revb_patch[] = {
+       { 0x80, 0x0003 },
+       { 0x081, 0xE022 },
+       { 0x410, 0x6080 },
+       { 0x418, 0x6080 },
+       { 0x420, 0x6080 },
+       { 0x428, 0xC000 },
+       { 0x441, 0x8014 },
+       { 0x458, 0x000b },
+       { 0x80, 0x0000 },
+};
+
 /* We use a function so we can use ARRAY_SIZE() */
 int wm5102_patch(struct arizona *arizona)
 {
@@ -582,7 +594,9 @@ int wm5102_patch(struct arizona *arizona)
                                             wm5102_reva_patch,
                                             ARRAY_SIZE(wm5102_reva_patch));
        default:
-               return 0;
+               return regmap_register_patch(arizona->regmap,
+                                            wm5102_revb_patch,
+                                            ARRAY_SIZE(wm5102_revb_patch));
        }
 }