Commit 085d9e9eeac3a48b6abc5bcd4ba9c92629d5c31b

Authored by Eric Nelson
Committed by Greg Kroah-Hartman
1 parent c0c9fe847a

ASoC: sgtl5000: add delay before first I2C access

commit 58cc9c9a175885bbf6bae3acf18233d0a8229a84 upstream.

To quote from section 1.3.1 of the data sheet:
	The SGTL5000 has an internal reset that is deasserted
	8 SYS_MCLK cycles after all power rails have been brought
	up. After this time, communication can start

	...
	1.0us represents 8 SYS_MCLK cycles at the minimum 8.0 MHz SYS_MCLK.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

sound/soc/codecs/sgtl5000.c
... ... @@ -1452,6 +1452,9 @@
1452 1452 if (ret)
1453 1453 return ret;
1454 1454  
  1455 + /* Need 8 clocks before I2C accesses */
  1456 + udelay(1);
  1457 +
1455 1458 /* read chip information */
1456 1459 ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, &reg);
1457 1460 if (ret)