Re: [PATCH 1/6] ASoC: sgtl5000: Fix regulator support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 6, 2016 at 8:14 PM, Clemens Gruber
<clemens.gruber@xxxxxxxxxxxx> wrote:
> From: Eric Nelson <eric@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> Signed-off-by: Clemens Gruber <clemens.gruber@xxxxxxxxxxxx>

Tested-by: Fabio Estevam <fabio.estevam@xxxxxxx>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux