diff options
author | Peter Ujfalusi <[email protected]> | 2014-04-01 16:45:00 +0300 |
---|---|---|
committer | Lee Jones <[email protected]> | 2014-06-03 08:11:21 +0100 |
commit | 006cea3aeced7f3d67fe2849da7724683853d87d (patch) | |
tree | 768df692c0abbc516cd4f1cfa37c166d3dae1b10 | |
parent | 68bab8662f49b9e158f1d32f11becd4e48c04079 (diff) |
mfd: twl6040: Move register patching earlier in probe
Make sure that we patch the ACCCTL register as the first thing when the
driver loads, thus configuring I2C fast mode and i2c access for dual access
registers.
Signed-off-by: Peter Ujfalusi <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
-rw-r--r-- | drivers/mfd/twl6040.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c index 574774d7f826..12b314ea48dc 100644 --- a/drivers/mfd/twl6040.c +++ b/drivers/mfd/twl6040.c @@ -675,6 +675,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 +728,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. |