All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/6] ASoC: sgtl5000: fix use of regulators and internal LDO
@ 2015-02-26 22:54 Eric Nelson
  2015-02-26 22:54 ` [RFC PATCH 1/6] ASoC: sgtl5000: fix regulator support Eric Nelson
                   ` (6 more replies)
  0 siblings, 7 replies; 29+ messages in thread
From: Eric Nelson @ 2015-02-26 22:54 UTC (permalink / raw)
  To: alsa-devel
  Cc: fabio.estevam, lars, tiwai, Eric Nelson, lgirdwood, broonie,
	rmk+kernel, jean-michel.hautbois, troy.kisky

This patch set addresses a structural problem in the handling of regulators
for VDDIO, VDDA, and VDDD in the SGTL5000 driver.

The first two of these power rails must be powered on prior to any I2C
communication, and yet the regulators were tied to the codec, which is
instantiated only after a fair amount of I2C communication takes place.

In other words, these regulators could never have function, and we can
surmise that no user of this driver has switched power supply rails
connected to them.

The third power rail (VDDD) can be derived internally (by using I2C registers)
though the data sheet says that if an external VDDD is used, it should be
enabled before MCLK is started and I2C activity begins.

Patch 1 moves the regulators to the I2C device and initializes them before
	I2C activity.
Patch 2 addresses an issue found during development of the patch and is
        somewhat unrelated to regulators. It is included for discussion
Patch 3 removes the root cause of patch 2
Patch 4 adds return value checks when setting the LINREG and ANA_POWER
	registers
Patch 5 addresses the cause of follow-on failures and the source of the
	error in patch 3.
Patch 6 removes the naive use of the supplies to lower power consumption
	and replaces it with something more modest.

The patch set is being sent as an RFC for discussion, and should probably
be squashed into two or three patches covering the regulator updates
(patches 1, 3-5 and perhaps 6), initialization error handling (patch 2).

Eric Nelson (6):
  ASoC: sgtl5000: fix regulator support
  ASoC: sgtl5000: write all default registers
  ASoC: sgtl5000: initialize CHIP_ANA_POWER to power-on defaults
  ASoC: sgtl5000: check return values
  ASoC: sgtl5000: disable internal PLL early
  ASoC: sgtl5000: Don't disable regulators in SND_SOC_BIAS_OFF

 sound/soc/codecs/sgtl5000.c | 417 +++++++++++---------------------------------
 sound/soc/codecs/sgtl5000.h |   2 +
 2 files changed, 102 insertions(+), 317 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2016-06-15 14:38 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-26 22:54 [PATCH RFC 0/6] ASoC: sgtl5000: fix use of regulators and internal LDO Eric Nelson
2015-02-26 22:54 ` [RFC PATCH 1/6] ASoC: sgtl5000: fix regulator support Eric Nelson
2015-03-06 20:04   ` Mark Brown
2015-03-06 21:09     ` Eric Nelson
2015-03-07  9:59       ` Mark Brown
2015-02-26 22:54 ` [RFC PATCH 2/6] ASoC: sgtl5000: write all default registers Eric Nelson
2015-03-06 20:14   ` Mark Brown
2015-03-06 22:24     ` Eric Nelson
2016-06-15 14:38   ` Applied "ASoC: sgtl5000: Write all default registers" to the asoc tree Mark Brown
2015-02-26 22:54 ` [RFC PATCH 3/6] ASoC: sgtl5000: initialize CHIP_ANA_POWER to power-on defaults Eric Nelson
2015-03-06 20:12   ` Mark Brown
2015-03-06 22:14     ` Eric Nelson
2015-03-07 10:28       ` Mark Brown
2015-02-26 22:54 ` [RFC PATCH 4/6] ASoC: sgtl5000: check return values Eric Nelson
2015-02-26 22:54 ` [RFC PATCH 5/6] ASoC: sgtl5000: disable internal PLL early Eric Nelson
2015-03-06 20:15   ` Mark Brown
2015-03-06 22:16     ` Eric Nelson
2016-06-15 14:38   ` Applied "ASoC: sgtl5000: Disable internal PLL early" to the asoc tree Mark Brown
2015-02-26 22:54 ` [RFC PATCH 6/6] ASoC: sgtl5000: Don't disable regulators in SND_SOC_BIAS_OFF Eric Nelson
2015-03-06 20:16   ` Mark Brown
2015-03-06 22:35     ` Eric Nelson
2015-03-07 10:41       ` Mark Brown
2015-03-06 22:49 ` [PATCH RFC 0/6] ASoC: sgtl5000: fix use of regulators and internal LDO Eric Nelson
2015-03-06 22:53   ` Russell King - ARM Linux
2015-03-06 22:58     ` Eric Nelson
2015-03-06 23:16       ` Eric Nelson
2015-03-06 23:24         ` Russell King - ARM Linux
2015-03-06 23:31           ` Eric Nelson
2015-03-07 10:45   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.