linux/sound/soc/codecs
Shawn Guo 11db0da831 ASoC: sgtl5000: clean up sgtl5000_enable_regulators()
Function sgtl5000_enable_regulators() is somehow odd in handling the
optional external VDDD supply.  The driver can only enable this supply
on SGTL5000 chip before revision 0x11, and of course when this external
VDDD is present.  It currently does something like below.

1. Check if regulator_bulk_get() on VDDA, VDDIO and VDDD will fail.  If
   it fails, VDDD must be absent and it falls on internal LDO by calling
   sgtl5000_replace_vddd_with_ldo().  Otherwise, VDDD is used.  And in
   either case, regulator_bulk_enable() will be called to enable
   3 supplies.

2. In case that SGTL5000 revision is later than 0x11, even if external
   VDDD is present, it has to roll back the 'enable' and 'get' calls
   with regulator_bulk_disable() and regulator_bulk_free(), and starts
   over again by calling sgtl5000_replace_vddd_with_ldo() and
   regulator_bulk_enable().

Such back and forth calls sequence is complicated and unnecessary.
Also, since commit 4ddfebd (regulator: core: Provide a dummy regulator
with full constraints), regulator_bulk_get() will always succeeds
because of the dummy regulator.  Thus the VDDD detection is broken.

The patch changes the flow to something like the following, which should
be more reasonable and clear, and also fix the VDDD detection breakage.

1. Check if we're running a chip before revision 0x11, on which an
   external VDDD can possibly be an option.

2. If it is an early revision, call regulator_get_optional() to detect
   whether an external VDDD supply is available.

3. If external VDDD is present, call sgtl5000_replace_vddd_with_ldo() to
   update sgtl5000->supplies info.

4. Drop regulator_bulk_get() call in sgtl5000_replace_vddd_with_ldo(),
   and call it in sgtl5000_enable_regulators() no matter it's an
   external VDDD or internal LDO.

5. Call regulator_bulk_enable() to enable these 3 regulators.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-18 18:49:17 +00:00
..
88pm860x-codec.c Merge remote-tracking branch 'asoc/topic/88pm860x' into asoc-next 2013-11-08 10:43:20 +00:00
88pm860x-codec.h ASoC: 88pm860x: Use regmap for I/O 2013-09-20 10:40:51 +01:00
ab8500-codec.c Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus 2013-11-20 15:20:31 +00:00
ab8500-codec.h ASoC: ab8500-codec: Set rx dai slots from rx_mask 2013-05-21 11:39:34 -05:00
ac97.c ASoC: ac97: Provide stub DAPM integration 2013-08-19 12:18:40 +01:00
ad193x.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
ad193x.h ASoC: ad193x: Use snd_soc_update_bits where appropriate 2011-11-28 18:57:52 +00:00
ad1836.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
ad1836.h ASoC: Fix wrong define for AD1836_ADC_WORD_OFFSET 2011-11-22 13:06:14 +00:00
ad1980.c ASoC: ad1980: Provide stub DAPM support 2013-08-07 10:14:23 +01:00
ad1980.h
ad73311.c ASoC: ad73311: Add DAPM support 2013-08-08 14:24:30 +01:00
ad73311.h
adau1373.c ASoC: adau1373: Issue soft reset on probe 2013-09-27 14:28:41 +01:00
adau1373.h ASoC: Add ADAU1373 codec support 2011-08-17 00:53:54 +09:00
adau1701.c ASoC: adau1701: Use gpio_set_value_cansleep() 2013-08-12 11:07:47 +01:00
adau1701.h
adav80x.c ASoC: adav80x: Convert to direct regmap usage 2013-09-27 14:29:45 +01:00
adav80x.h
ads117x.c ASoC: ads711x: Add DAPM support 2013-08-07 19:18:08 +01:00
ak4104.c ASoC: ak4104: provide a module device table 2013-09-17 00:45:16 +01:00
ak4535.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
ak4535.h ASoC: ak4535: Convert to direct regmap API usage 2012-02-16 23:04:45 -08:00
ak4554.c ASoC: ak4554: Add DAPM support 2013-08-13 13:38:36 +01:00
ak4641.c sound: Remove unnecessary semicolons 2013-10-14 11:00:05 +02:00
ak4641.h
ak4642.c Merge remote-tracking branch 'asoc/topic/ak4642' into asoc-next 2013-11-08 10:43:22 +00:00
ak4671.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
ak4671.h
ak5386.c ASoC: ak5386: Add DAPM support 2013-08-12 11:23:38 +01:00
alc5623.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
alc5623.h
alc5632.c treewide: fix "usefull" typo 2013-10-14 15:44:24 +02:00
alc5632.h ASoC: alc5632: Refactored DAPM routes to add voice support 2012-02-11 23:02:47 +00:00
arizona.c ASoC: arizona: Set FLL to free-run before disabling 2013-11-20 15:20:01 +00:00
arizona.h ASoC: arizona: Add widget<->mux route into mux route macro 2013-08-12 11:56:13 +01:00
bt-sco.c ASoC: bt-sco: Provide stub DAPM integration 2013-08-19 12:20:26 +01:00
cq93vc.c ASoC: cq93vc: Use regmap for I/O 2013-09-24 19:40:12 +01:00
cs42l51.c ASoC: cs42l51: Use module_i2c_driver 2012-08-06 15:20:35 +01:00
cs42l51.h
cs42l52.c ASoC: cs42l52: Add chip rev id message 2013-10-25 16:37:58 +01:00
cs42l52.h Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus 2013-11-20 15:20:31 +00:00
cs42l73.c ASoC: cs42l73: Add Device Tree support for CS42L73 2013-10-20 18:15:44 +01:00
cs42l73.h ASoC: cs42l73: Namespace defines for cs42l73 codec 2013-10-18 00:37:29 +01:00
cs4270.c ASoC: cs4270: Add DAPM support 2013-08-18 18:27:40 +01:00
cs4271.c ASoC: cs4271: Include linux/of.h header 2013-10-16 18:47:39 +01:00
cx20442.c ASoC: cx20442: add bias control over a platform provided regulator 2012-01-09 11:20:16 +00:00
cx20442.h
da732x_reg.h ASoC: codecs: Add DA732x codec driver 2012-06-11 20:23:55 +08:00
da732x.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
da732x.h ASoC: codecs: Add DA732x codec driver 2012-06-11 20:23:55 +08:00
da7210.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
da7213.c ASoC: da7213: Fix setting dmic_samplephase and dmic_clk_rate 2013-05-09 14:29:04 +01:00
da7213.h ASoC: codecs: Add da7213 codec 2013-02-14 17:27:17 +00:00
da9055.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
dmic.c ASoC: dmic: Convert table based DAPM setup 2013-08-27 15:31:58 +01:00
hdmi.c ASoC: hdmi: Provide stub DAPM integration 2013-08-19 12:19:02 +01:00
isabelle.c ASoC: isabelle: remove __dev* attributes 2012-12-10 00:30:44 +09:00
isabelle.h ASoC: Support TI Isabelle Audio driver 2012-06-05 10:42:57 +01:00
jz4740.c ASoC: jz4740: Remove redundant platform_set_drvdata() 2013-05-12 20:46:16 +04:00
Kconfig Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
l3.c
lm4857.c ASoC: lm4857: Convert to regmap 2013-07-28 19:09:16 +01:00
lm49453.c ASoC: lm49453: Update lm49453_reg_defs values as per LM49453 HW revision-B 2012-12-24 15:45:10 +00:00
lm49453.h ASoC: Support TI LM49453 Audio driver 2012-04-01 11:35:41 +01:00
Makefile Merge remote-tracking branch 'asoc/topic/new-pcm' into asoc-next 2013-08-22 14:28:43 +01:00
max9768.c ASoC: max9768: Add DAPM support 2013-08-11 13:30:17 +01:00
max9850.c ASoC: max9850: Convert to direct regmap API usage 2013-09-24 19:35:24 +01:00
max9850.h
max9877.c ASoC: max9877: Add basic DAPM support 2013-08-13 13:40:35 +01:00
max9877.h
max98088.c Merge remote-tracking branch 'asoc/topic/warn' into asoc-next 2013-11-08 10:43:41 +00:00
max98088.h
max98090.c ASoC: max98090: Use power efficient workqueue 2013-07-19 12:23:35 +01:00
max98090.h ASoC:: max98090: Remove executable bit 2013-03-20 10:54:12 +01:00
max98095.c Merge remote-tracking branch 'asoc/topic/warn' into asoc-next 2013-11-08 10:43:41 +00:00
max98095.h ASoC: max98095: add jack detection 2012-04-01 11:28:24 +01:00
mc13783.c ASoC: Updates for v3.13 2013-10-25 11:43:47 +02:00
mc13783.h ASoC: Add mc13783 codec 2012-05-18 16:42:20 +01:00
ml26124.c ASoC: ml26124: Fix negative array index read 2013-10-30 14:33:08 -07:00
ml26124.h ASoC: Add LAPIS Semiconductor ML26124 driver 2012-04-01 11:28:28 +01:00
pcm1681.c Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-next 2013-11-08 10:43:32 +00:00
pcm1792a.c Merge remote-tracking branch 'asoc/topic/pcm1792a' into asoc-next 2013-11-08 10:43:33 +00:00
pcm1792a.h ASoC: Add PCM1792A spi mode codec support 2013-08-05 18:01:29 +01:00
pcm3008.c ASoC: pcm3008: Manage DAC and ADC power with DAPM 2013-08-18 16:40:01 +01:00
pcm3008.h
rt5631.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
rt5631.h ASoC: Add driver for rt5631 2011-09-21 15:52:23 +01:00
rt5640.c ASoC: rt5640: Fix ignored error checks 2013-10-30 10:11:25 -07:00
rt5640.h ASoC: rt5640: change widget sequence for depop 2013-08-30 16:43:23 +01:00
sgtl5000.c ASoC: sgtl5000: clean up sgtl5000_enable_regulators() 2013-12-18 18:49:17 +00:00
sgtl5000.h ASoC: sglt5000: Fix SGTL5000_PLL_FRAC_DIV_MASK 2013-07-05 10:45:49 +01:00
si476x.c ASoC: si476x: Fix locking of core 2013-10-20 22:42:02 +01:00
sigmadsp.c ASoC: sigmadsp: Fix endianness conversion issue 2012-12-10 12:20:39 +09:00
sigmadsp.h ASoC: SigmaDSP: Add regmap support 2011-11-29 12:01:23 +00:00
sn95031.c ASoC: sn95031: Convert to regmap 2013-09-26 10:55:42 +01:00
sn95031.h
spdif_receiver.c ASoC: spdif: Add stub DAPM widgets for Rx 2013-08-19 12:20:53 +01:00
spdif_transmitter.c ASoC: spdif: Remove duplicate const 2013-08-19 12:20:53 +01:00
ssm2518.c ASoC: ssm2518: Fix trivial typo in checking tx_mask and rx_mask values 2013-06-12 16:20:44 +01:00
ssm2518.h ASoC: Add ssm2518 support 2013-05-25 10:33:30 -04:00
ssm2602.c ASoC: ssm2602: Fix cache sync 2013-08-31 18:18:00 +01:00
ssm2602.h ASoC: ssm2602: Support setting the oscillator and the clock output state 2011-09-27 13:30:48 +01:00
sta32x.c ASoC: sta32x: Use power efficient workqueue 2013-07-19 12:23:59 +01:00
sta32x.h ASoC: sta32x: preserve coefficient RAM 2011-11-14 21:32:12 +00:00
sta529.c ASoC: sta529: Fix update register bits in sta529_set_dai_fmt 2012-12-20 16:01:26 +00:00
stac9766.c ASoC: ac97: Support multi-platform AC'97 2013-06-27 09:48:42 +01:00
stac9766.h
tas5086.c ASoC: Updates for v3.13 2013-10-25 11:43:47 +02:00
tlv320aic3x.c Merge remote-tracking branch 'asoc/topic/tlv320aic3x' into asoc-next 2013-11-08 10:43:39 +00:00
tlv320aic3x.h ASoC: tlv320aic3x: Convert mic bias to a supply widget 2013-02-04 18:35:19 +00:00
tlv320aic23.c ASoC: tlv320aic23: Convert to direct regmap API usage 2013-09-24 20:38:04 +01:00
tlv320aic23.h
tlv320aic26.c ASoC: tlv320aic26: Convert to direct regmap API usage 2013-09-25 13:30:59 +01:00
tlv320aic26.h ASoC: tlv320aic26: Convert to direct regmap API usage 2013-09-25 13:30:59 +01:00
tlv320aic32x4.c ASoC: tlv320aic32x4: Convert to direct regmap API usage 2013-09-26 10:58:36 +01:00
tlv320aic32x4.h ASoC: tlv320aic32x4: Fix problem with first capture. 2012-11-01 14:35:56 +00:00
tlv320dac33.c ASoC: tlv320dac33: Remove suspend/resume soc driver operations 2013-01-13 21:34:47 +09:00
tlv320dac33.h
tpa6130a2.c Merge remote-tracking branch 'asoc/topic/warn' into asoc-next 2013-11-08 10:43:41 +00:00
tpa6130a2.h
twl4030.c ASoC: twl4030: Use virtual DAPM mixer controls 2013-10-07 11:49:32 +01:00
twl6040.c sound: Remove unnecessary semicolons 2013-10-14 11:00:05 +02:00
twl6040.h ASoC: twl6040 - add method to query HS DC offset step size in mV 2012-01-20 13:58:26 +00:00
uda134x.c ASoC: uda134x: fix codec driver by converting to DAPM 2013-07-30 12:04:02 +01:00
uda134x.h
uda1380.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
uda1380.h
wl1273.c ASoC: wl1273: Add stub DAPM support 2013-08-18 18:27:08 +01:00
wl1273.h
wm0010.c Merge remote-tracking branch 'asoc/topic/wm0010' into asoc-next 2013-11-08 10:43:41 +00:00
wm1250-ev1.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm2000.c ASoC: wm2000: Use WARN_ON() instead of BUG_ON() 2013-11-06 10:26:25 +00:00
wm2000.h ASoC: wm2000: Expose some more registers for diagnostics 2013-03-29 13:08:03 +00:00
wm2200.c ASoC: wm_adsp: Split ADSP1 and ADSP2 firmware controls 2013-03-29 18:00:24 +00:00
wm2200.h ASoC: wm2200: Add WM2200 CODEC driver 2012-01-26 16:07:55 +00:00
wm5100-tables.c ASoC: codecs: Refresh copyrights for Wolfson drivers 2012-06-03 13:06:37 +01:00
wm5100.c ASoC: wm5100: Use WARN_ON() instead of BUG_ON() 2013-11-06 10:26:36 +00:00
wm5100.h ASoC: Update regmap access for WM5100 DSP control registers 2012-04-23 18:52:31 +01:00
wm5102.c ASoC: arizona: Fix typo in name of EQ coefficient controls 2013-11-13 13:27:59 +00:00
wm5102.h ASoC: arizona: Add support for directly setting the FLL REFCLK 2013-03-04 11:01:00 +08:00
wm5110.c ASoC: Fixes for v3.13 2013-11-21 15:07:44 +01:00
wm5110.h ASoC: arizona: Add support for directly setting the FLL REFCLK 2013-03-04 11:01:00 +08:00
wm8350.c ASoC: wm8350: Replace BUG() with WARN() 2013-11-07 19:55:18 +00:00
wm8350.h
wm8400.c ASoC: wm8400: Use regmap for I/O 2013-09-17 00:41:39 +01:00
wm8400.h
wm8510.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8510.h
wm8523.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8523.h
wm8580.c ASoC: wm8580: Use WARN() instead of BUG_ON() 2013-11-06 10:26:28 +00:00
wm8580.h
wm8711.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8711.h
wm8727.c ASoC: wm8727: Add DAPM support 2013-08-18 18:39:27 +01:00
wm8728.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8728.h
wm8731.c ASoC: wm8731: add rates constraints 2013-07-30 12:28:01 +01:00
wm8731.h
wm8737.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8737.h
wm8741.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8741.h
wm8750.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8750.h
wm8753.c ASoC: wm8753: Use power efficient workqueue 2013-07-19 12:25:10 +01:00
wm8753.h
wm8770.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8770.h
wm8776.c ASoC: wm8776: Use WARN_ON() instead of BUG_ON() 2013-11-06 10:26:53 +00:00
wm8776.h
wm8782.c ASoC: wm8782: Add DAPM support 2013-08-18 18:39:49 +01:00
wm8804.c ASoC: wm8804: Remove redundant check 2012-12-24 15:54:27 +00:00
wm8804.h
wm8900.c ASoC: wm8900: Replace BUG() with WARN() 2013-11-07 19:55:18 +00:00
wm8900.h
wm8903.c ASoC: dapm: Add a helper to get the CODEC for DAPM kcontrol 2013-07-29 18:40:59 +01:00
wm8903.h
wm8904.c ASoC: wm8904: Replace BUG() with WARN() 2013-11-07 19:55:19 +00:00
wm8904.h ASoC: Optimise performance of WM8904 ADC 128fs OSR mode 2012-01-20 13:58:26 +00:00
wm8940.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8940.h
wm8955.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8955.h
wm8958-dsp2.c ASoC: wm8958: Replace BUG() with WARN() 2013-11-07 19:55:19 +00:00
wm8960.c Merge remote-tracking branch 'asoc/topic/wm8960' into asoc-next 2013-08-22 14:29:01 +01:00
wm8960.h
wm8961.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8961.h
wm8962.c Merge remote-tracking branch 'asoc/fix/wm8962' into asoc-linus 2013-11-20 15:20:38 +00:00
wm8962.h
wm8971.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8971.h
wm8974.c treewide: Fix typo in printks 2013-04-12 15:21:36 +02:00
wm8974.h
wm8978.c ASoC: wm8978: enable symmetric rates 2013-07-12 09:44:56 +01:00
wm8978.h ASoC: Convert wm8978 to direct regmap API usage 2012-01-20 13:58:19 +00:00
wm8983.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-02-21 17:40:58 -08:00
wm8983.h ASoC: WM8983: Initial driver 2011-07-15 23:39:53 +09:00
wm8985.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-02-21 17:40:58 -08:00
wm8985.h
wm8988.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8988.h
wm8990.c ASoC: wm8990: Use SOC_SINGLE_EXT_TLV() instead of open-coding it 2013-06-19 19:47:37 +01:00
wm8990.h
wm8991.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8991.h ASoC: wm8991: Use SOC_SINGLE_EXT_TLV() instead of open-coding it 2013-06-19 19:47:39 +01:00
wm8993.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm8993.h ASoC: wm_hubs: Clamp inputs to VMID while we ramp 2012-02-11 23:11:21 +00:00
wm8994.c Merge remote-tracking branch 'asoc/topic/wm8994' into asoc-next 2013-08-22 14:29:02 +01:00
wm8994.h ASoC: wm8994: Allow debounce before MICDET identification 2013-06-01 19:28:58 +01:00
wm8995.c ASoC: dapm: Add a helper to get the CODEC for DAPM kcontrol 2013-07-29 18:40:59 +01:00
wm8995.h ASoC: wm8995: Use SOC_SINGLE_EXT() instead of open-coding it 2013-06-19 19:47:42 +01:00
wm8996.c Merge remote-tracking branch 'asoc/topic/wm8996' into asoc-next 2013-11-08 10:43:43 +00:00
wm8996.h ASoC: Disable register synchronisation for low frequency WM8996 SYSCLK 2012-01-20 13:54:34 +00:00
wm8997.c ASoC: arizona: Fix typo in name of EQ coefficient controls 2013-11-13 13:27:59 +00:00
wm8997.h ASoC: wm8997: Initial CODEC driver 2013-08-13 11:31:56 +01:00
wm9081.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm9081.h
wm9090.c ASoC: codecs: remove __dev* attributes 2012-12-10 00:31:51 +09:00
wm9090.h
wm9705.c ASoC: ac97: Support multi-platform AC'97 2013-06-27 09:48:42 +01:00
wm9705.h
wm9712.c ASoC: ac97: Support multi-platform AC'97 2013-06-27 09:48:42 +01:00
wm9712.h
wm9713.c ASoC: wm9713: Use WARN_ON() instead of BUG_ON() 2013-11-06 10:27:03 +00:00
wm9713.h
wm_adsp.c Merge remote-tracking branch 'asoc/topic/warn' into asoc-next 2013-11-08 10:43:41 +00:00
wm_adsp.h ASoC: wm_adsp: Sanitize parameter passing 2013-08-01 11:58:46 +01:00
wm_hubs.c ASoC: wm_hubs: Replace BUG() with WARN() 2013-11-07 19:55:20 +00:00
wm_hubs.h ASoC: wm_hubs: Allow configuration of MICBIAS power up delay via pdata 2012-08-22 19:00:37 +01:00
wmfw.h ASoC: wm_adsp: Implement support for coefficeint file format 1 2013-01-18 15:02:17 +09:00