Skip to content

Commit

Permalink
ASoC: wm8996: Move reset before the initial regulator disable
Browse files Browse the repository at this point in the history
If we don't have control over the LDO but do have control over the other
regulators then we may end up trying to write to a powered off device.

Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
broonie committed Jun 11, 2012
1 parent 90ba685 commit db13340
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/wm8996.c
Original file line number Diff line number Diff line change
Expand Up @@ -3205,14 +3205,14 @@ static __devinit int wm8996_i2c_probe(struct i2c_client *i2c,
dev_info(&i2c->dev, "revision %c\n",
(reg & WM8996_CHIP_REV_MASK) + 'A');

regulator_bulk_disable(ARRAY_SIZE(wm8996->supplies), wm8996->supplies);

ret = wm8996_reset(wm8996);
if (ret < 0) {
dev_err(&i2c->dev, "Failed to issue reset\n");
goto err_regmap;
}

regulator_bulk_disable(ARRAY_SIZE(wm8996->supplies), wm8996->supplies);

wm8996_init_gpio(wm8996);

ret = snd_soc_register_codec(&i2c->dev,
Expand Down

0 comments on commit db13340

Please sign in to comment.