Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
[cascardo/linux.git] / drivers / mfd / twl6040.c
index 574774d..ae26d84 100644 (file)
@@ -441,12 +441,9 @@ int twl6040_set_pll(struct twl6040 *twl6040, int pll_id,
                                            TWL6040_HPLLENA;
                                break;
                        case 19200000:
-                               /*
-                               * PLL disabled
-                               * (enable PLL if MCLK jitter quality
-                               *  doesn't meet specification)
-                               */
-                               hppllctl |= TWL6040_MCLK_19200KHZ;
+                               /* PLL enabled, bypass mode */
+                               hppllctl |= TWL6040_MCLK_19200KHZ |
+                                           TWL6040_HPLLBP | TWL6040_HPLLENA;
                                break;
                        case 26000000:
                                /* PLL enabled, active mode */
@@ -454,9 +451,9 @@ int twl6040_set_pll(struct twl6040 *twl6040, int pll_id,
                                            TWL6040_HPLLENA;
                                break;
                        case 38400000:
-                               /* PLL enabled, active mode */
+                               /* PLL enabled, bypass mode */
                                hppllctl |= TWL6040_MCLK_38400KHZ |
-                                           TWL6040_HPLLENA;
+                                           TWL6040_HPLLBP | TWL6040_HPLLENA;
                                break;
                        default:
                                dev_err(twl6040->dev,
@@ -675,6 +672,9 @@ static int twl6040_probe(struct i2c_client *client,
        mutex_init(&twl6040->mutex);
        init_completion(&twl6040->ready);
 
+       regmap_register_patch(twl6040->regmap, twl6040_patch,
+                             ARRAY_SIZE(twl6040_patch));
+
        twl6040->rev = twl6040_reg_read(twl6040, TWL6040_REG_ASICREV);
        if (twl6040->rev < 0) {
                dev_err(&client->dev, "Failed to read revision register: %d\n",
@@ -725,10 +725,6 @@ static int twl6040_probe(struct i2c_client *client,
                goto readyirq_err;
        }
 
-       /* dual-access registers controlled by I2C only */
-       regmap_register_patch(twl6040->regmap, twl6040_patch,
-                             ARRAY_SIZE(twl6040_patch));
-
        /*
         * The main functionality of twl6040 to provide audio on OMAP4+ systems.
         * We can add the ASoC codec child whenever this driver has been loaded.