linux/sound
Eric Nelson 940adb280d ASoC: sgtl5000: Fix regulator support
Regulator support on SGTL5000 is broken because the VDDIO and
VDDA and VDDD should be powered on before enabling MCLK as
shown in Figure 4 of [1]. This requires moving control of the
regulators from the codec block to the I2C block of the driver.

The bulk of this patch consists of swapping the codec device with
the i2c client. The new field num_supplies in struct sgtl5000_priv
is used instead of ARRAY_SIZE(supplies) to handle the special case
when the internal LDO is used instead of external VDDD.

Note that ER1 in the SGTL5000 Errata document [2] suggests that
all designs should use external VDDD.

Since the internal LDO can only be enabled after I2C is available,
there's no benefit in treating it as a regulator, so this patch
removes the regulator structure surrounding it.

Instead, a single block of code in sgtl5000_i2c_probe() performs
the initialization sequence in section 2.2.1.1 of [3] and page
26 of [1].

References:
[1] SGTL5000 data sheet
    http://cache.nxp.com/files/analog/doc/data_sheet/SGTL5000.pdf
[2] SGTL5000 errata
    http://cache.nxp.com/files/analog/doc/errata/SGTL5000ER.pdf
[3] SGTL5000 Initialization and programming app note
    http://cache.nxp.com/files/analog/doc/app_note/AN3663.pdf

Signed-off-by: Eric Nelson <eric@nelint.com>
Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-15 14:09:09 +01:00
..
aoa ALSA: aoa-soundbus: Switch to dev_pm_ops 2015-08-05 16:47:47 +02:00
arm dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
atmel
core ASoC: Updates for v4.7 2016-05-16 14:59:00 +02:00
drivers Merge branch 'akpm' (patches from Andrew) 2016-03-18 19:26:54 -07:00
firewire ALSA: firewire-lib: change a member of event structure to suppress sparse wanings to bool type 2016-05-18 16:32:09 +02:00
hda ASoC: Updates for v4.7 2016-05-16 14:59:00 +02:00
i2c ALSA: i2c: constify snd_i2c_ops structures 2015-11-30 11:40:08 +01:00
isa ALSA: isa/wavefront: prevent some out of bound writes 2016-05-08 11:39:44 +02:00
mips ALSA: Remove deprecated AU1X00 AC97 driver 2016-02-08 08:17:15 +01:00
oss sound: oss: Use setup_timer and mod_timer. 2016-05-17 18:02:20 +02:00
parisc
pci sound updates #2 for 4.7-rc1 2016-05-28 12:23:12 -07:00
pcmcia
ppc PCI: Remove includes of asm/pci-bridge.h 2016-02-05 16:29:28 -06:00
sh
soc ASoC: sgtl5000: Fix regulator support 2016-06-15 14:09:09 +01:00
sparc ALSA: Add missing dependency on CONFIG_SND_TIMER 2016-01-27 07:10:38 +01:00
spi ALSA: at73c213: manage SSC clock 2016-01-20 09:59:27 +01:00
synth ALSA: emux: constify nrpn_conv_table structures 2016-01-06 10:19:49 +01:00
usb Merge branch 'for-next' into for-linus 2016-05-16 09:13:08 +02:00
ac97_bus.c ASoC: Updates for v4.3 2015-08-31 16:25:22 +02:00
Kconfig
last.c
Makefile
sound_core.c sound: fix check for error condition of register_chrdev() 2015-11-07 11:14:30 +01:00
sound_firmware.c sound: sound_firmware: Fix invalid use of vfs_read() 2015-05-26 13:48:58 +02:00