From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Eduardo Valentin <eduardo.valentin@nokia.com>
Cc: ext Tony Lindgren <tony@atomide.com>,
"Ujfalusi Peter (Nokia-D/Tampere)" <peter.ujfalusi@nokia.com>,
"Nurkkala Eero.An (EXT-Offcode/Oulu)"
<ext-Eero.Nurkkala@nokia.com>, Jarkko Nikula <jhnikula@gmail.com>,
Linux-OMAP <linux-omap@vger.kernel.org>,
ALSA-Devel <alsa-devel@vger.kernel.org>
Subject: Re: [PATCH 7/8] ASoC: tlv320aic3x: add initial usage of regulator framework to control avdd_dac
Date: Thu, 8 Oct 2009 14:38:43 +0100 [thread overview]
Message-ID: <20091008133843.GG29176@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <1255003137-1034-8-git-send-email-eduardo.valentin@nokia.com>
On Thu, Oct 08, 2009 at 02:58:56PM +0300, Eduardo Valentin wrote:
> This patch adds initial usage of regulator framework to control avdd_dac
> inside tlv320aic3x ASoC codec driver.
If you're going to do this you should add support for all the supplies
of the device, not just one of them. The extra effort required is low
and it avoids compatibility problems when someone wants to set up other
supplies, causing existing boards to need to specify them.
> + aic3x->regulator = regulator_get(&i2c->dev, "avdd_dac");
> + if (IS_ERR(aic3x->regulator)) {
> + dev_warn(&i2c->dev, "No regulator to supply avdd_dac."
> + " Assuming always on.\n");
You shouldn't split error messages over multiple lines like this, it
breaks grepping to try to find where the message came from.
I'd also rather see failure to get the regulator treated as a hard
error. When the regulator API compiled out it is stubbed so that for
simple get/enable/disable/put usage it will return success but do
nothing. If the regulator API is compiled in and we're not able to
acquire regulators there's a good chance that things will break (eg, due
to supplies being turned off because they appear to be unused) so
flagging the error immediately is less likely to result in runtime
fragility.
> + /*
> + * REVISIT: Need to add proper code to put into sleep mode
> + * avdd_dac regulator. For now, just leave it on.
> + */
> + if (aic3x->regulator) {
> + int err;
> +
> + err = regulator_enable(aic3x->regulator);
> + if (err < 0)
> + return err;
> + }
The best way to handle this is to push the enable/disable into the bias
level configuration so that the regulators are enabled when the chip
goes off->standby and disabled during standby->off. This will have the
same effect for the moment but will mean that we'll be able to add core
support for fully powering down the audio subsystem at runtime in the
future.
next prev parent reply other threads:[~2009-10-08 13:39 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-08 11:58 [PATCH 0/8] RX-51 audio drivers Eduardo Valentin
2009-10-08 11:58 ` [PATCH 1/8] ASoC: TPA6130A2 amplifier driver Eduardo Valentin
2009-10-08 12:30 ` Eero Nurkkala
2009-10-08 13:07 ` Peter Ujfalusi
2009-10-08 13:07 ` Peter Ujfalusi
2009-10-08 12:30 ` Eero Nurkkala
2009-10-08 12:52 ` Mark Brown
2009-10-08 13:38 ` Peter Ujfalusi
2009-10-08 13:38 ` Peter Ujfalusi
2009-10-08 13:53 ` Mark Brown
2009-10-09 6:53 ` Peter Ujfalusi
2009-10-09 10:36 ` Mark Brown
2009-10-09 6:53 ` Peter Ujfalusi
2009-10-08 13:53 ` Mark Brown
2009-10-08 12:52 ` Mark Brown
2009-10-08 11:58 ` Eduardo Valentin
2009-10-08 11:58 ` [PATCH 2/8] ASoC: OMAP: RX-51 Machine driver and AIC34b_dummy driver Eduardo Valentin
2009-10-08 12:31 ` Eero Nurkkala
2009-10-08 12:31 ` Eero Nurkkala
2009-10-08 13:18 ` Eduardo Valentin
2009-10-08 13:18 ` Eduardo Valentin
2009-10-08 13:11 ` Mark Brown
2009-10-09 5:44 ` Jarkko Nikula
2009-10-09 5:44 ` Jarkko Nikula
2009-10-09 6:37 ` Eduardo Valentin
2009-10-09 12:19 ` Mark Brown
2009-10-09 6:37 ` Eduardo Valentin
2009-10-08 13:11 ` Mark Brown
2009-10-08 11:58 ` Eduardo Valentin
2009-10-08 11:58 ` [PATCH 3/8] McBSP: OMAP3: Add Sidetone feature Eduardo Valentin
2009-10-08 13:17 ` Mark Brown
2009-10-08 13:17 ` Mark Brown
2009-10-08 13:23 ` Eduardo Valentin
2009-10-08 13:27 ` Mark Brown
2009-10-09 5:09 ` Eero Nurkkala
2009-10-09 10:44 ` [alsa-devel] " Mark Brown
2009-10-12 6:17 ` Eero Nurkkala
2009-10-12 9:12 ` Mark Brown
2009-10-12 9:28 ` Eero Nurkkala
2009-10-12 9:32 ` Mark Brown
2009-10-12 10:28 ` Eero Nurkkala
2009-10-12 10:33 ` Mark Brown
2009-10-08 11:58 ` Eduardo Valentin
2009-10-08 11:58 ` [PATCH 4/8] OMAP: RX51: Add audio board file Eduardo Valentin
2009-10-08 11:58 ` Eduardo Valentin
2009-10-08 11:58 ` [PATCH 5/8] board-rx51-peripherals: split vaux3 and vmmc2 supplies Eduardo Valentin
2009-10-08 11:58 ` Eduardo Valentin
2009-10-08 13:21 ` Mark Brown
2009-10-09 6:45 ` Eduardo Valentin
2009-10-09 6:45 ` Eduardo Valentin
2009-10-09 11:03 ` Mark Brown
2009-10-12 8:08 ` Eduardo Valentin
2009-10-12 9:18 ` Mark Brown
2009-10-14 17:15 ` Tony Lindgren
2009-10-15 9:01 ` Mark Brown
2009-10-16 16:14 ` Tony Lindgren
2009-10-08 13:21 ` Mark Brown
2009-10-08 11:58 ` [PATCH 6/8] RX-51: Audio: Add usage of regulator framework to control VMMC2 Eduardo Valentin
2009-10-08 11:58 ` Eduardo Valentin
2009-10-08 13:26 ` Mark Brown
2009-10-12 9:04 ` Eduardo Valentin
2009-10-12 9:21 ` Mark Brown
2009-10-12 9:21 ` Mark Brown
2009-10-19 9:13 ` Eduardo Valentin
2009-10-19 9:23 ` Mark Brown
2009-10-19 9:24 ` Mark Brown
2009-10-19 9:24 ` Mark Brown
2009-10-19 9:23 ` Mark Brown
2009-10-19 9:13 ` Eduardo Valentin
2009-10-12 9:04 ` Eduardo Valentin
2009-10-08 11:58 ` [PATCH 7/8] ASoC: tlv320aic3x: add initial usage of regulator framework to control avdd_dac Eduardo Valentin
2009-10-08 11:58 ` Eduardo Valentin
2009-10-08 12:17 ` Eero Nurkkala
2009-10-08 13:17 ` Eduardo Valentin
2009-10-08 13:40 ` Mark Brown
2009-10-08 13:40 ` Mark Brown
2009-10-08 15:44 ` ext-Eero.Nurkkala
2009-10-08 15:44 ` ext-Eero.Nurkkala
2009-10-08 16:01 ` Mark Brown
2009-10-09 4:28 ` Eero Nurkkala
2009-10-09 4:28 ` Eero Nurkkala
2009-10-09 10:19 ` Mark Brown
2009-10-09 10:19 ` Mark Brown
2009-10-08 16:01 ` Mark Brown
2009-10-08 12:17 ` Eero Nurkkala
2009-10-08 13:38 ` Mark Brown [this message]
2009-10-08 13:38 ` Mark Brown
2009-10-08 11:58 ` [PATCH 8/8] ASoC: tpa6130a2: Control vdd using regulator framework Eduardo Valentin
2009-10-08 13:43 ` Mark Brown
2009-10-08 13:56 ` Eduardo Valentin
2009-10-08 14:41 ` Mark Brown
2009-10-08 14:41 ` Mark Brown
2009-10-08 11:58 ` Eduardo Valentin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091008133843.GG29176@rakim.wolfsonmicro.main \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@vger.kernel.org \
--cc=eduardo.valentin@nokia.com \
--cc=ext-Eero.Nurkkala@nokia.com \
--cc=jhnikula@gmail.com \
--cc=linux-omap@vger.kernel.org \
--cc=peter.ujfalusi@nokia.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.