Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Pargmann <mpa@pengutronix.de>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
	Liam Girdwood <lgirdwood@gmail.com>,
	kernel@pengutronix.de
Subject: Re: [PATCH v5 2/4] ASoC: tlv320aic32x4: Support for regulators
Date: Tue, 18 Feb 2014 22:28:28 +0100	[thread overview]
Message-ID: <20140218212828.GD10590@pengutronix.de> (raw)
In-Reply-To: <20140218012725.GS2669@sirena.org.uk>


[-- Attachment #1.1: Type: text/plain, Size: 1758 bytes --]

On Tue, Feb 18, 2014 at 10:27:25AM +0900, Mark Brown wrote:
> On Mon, Feb 17, 2014 at 11:04:18AM +0100, Markus Pargmann wrote:
> 
> > +	if (IS_ERR(aic32x4->supply_iov)) {
> > +		dev_err(dev, "Missing supply 'iov'\n");
> > +		ret = -EINVAL;
> > +	}
> 
> This won't work with deferred probe and is ignoring the error value
> reported by the regualtor API.  It should pass back what it was given
> and still needs to handle deferred probe even if it's happy for a
> regulator not to be there.

Right, I added -EPROBE_DEFER checks for every regulator.
I replaced the usage of the return value to directly return the errors.
Otherwise it could be confusing to see multiple error messages and get
one error value returned.

> 
> > +	if (!IS_ERR(aic32x4->supply_iov)) {
> > +		ret = regulator_enable(aic32x4->supply_iov);
> > +		if (ret) {
> > +			printk("Failed to enable regulator iov\n");
> > +			return ret;
> > +		}
> > +	}
> 
> dev_err().  It would probably be easier to put one of the child
> regulators you did get into supply_iov instead so that outside of the
> probe you don't need to worry about which is actually there.
> 
> I'm also not seeing any disables prior to remove.

Replaced all printk's with dev_err. I am now disabling all regulators in
the remove function and added error handling which disables the
regulators.

I will test all changes tomorrow and resend the series.

Thanks,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2014-02-18 21:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-16 18:27 [PATCH v4 0/4] ASoC: tlv320aic32x4: DT support Markus Pargmann
     [not found] ` <1392575252-9222-1-git-send-email-mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-16 18:27   ` [PATCH v4 1/4] ASoC: tlv320aic32x4: Support for master clock Markus Pargmann
2014-02-16 18:27 ` [PATCH v4 2/4] ASoC: tlv320aic32x4: Support for regulators Markus Pargmann
2014-02-17  9:07   ` Markus Pargmann
2014-02-16 18:27 ` [PATCH v4 3/4] ASoC: tlv320aic32x4: Rearrange clock tree shutdown Markus Pargmann
2014-02-16 18:27 ` [PATCH v4 4/4] Revert "ASoC: codec doc, tlv320aic3x: Add tlv320aic32x4 as compatible" Markus Pargmann
2014-02-17 10:04 ` [PATCH v5 0/4] ASoC: tlv320aic32x4: DT support Markus Pargmann
2014-02-17 10:04   ` [PATCH v5 1/4] ASoC: tlv320aic32x4: Support for master clock Markus Pargmann
     [not found]     ` <1392631460-32002-2-git-send-email-mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-18  1:23       ` Mark Brown
2014-02-18 20:46         ` Markus Pargmann
     [not found]           ` <20140218204646.GB10590-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-19  3:54             ` Mark Brown
2014-02-20 11:37               ` Markus Pargmann
     [not found]                 ` <20140220113749.GB16727-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-20 11:47                   ` Mark Brown
2014-02-17 10:04   ` [PATCH v5 2/4] ASoC: tlv320aic32x4: Support for regulators Markus Pargmann
2014-02-18  1:27     ` Mark Brown
2014-02-18 21:28       ` Markus Pargmann [this message]
2014-02-17 10:04   ` [PATCH v5 3/4] ASoC: tlv320aic32x4: Rearrange clock tree shutdown Markus Pargmann
2014-02-17 10:04   ` [PATCH v5 4/4] Revert "ASoC: codec doc, tlv320aic3x: Add tlv320aic32x4 as compatible" Markus Pargmann
2014-02-18  1:28     ` Mark Brown
2014-02-18 20:48       ` Markus Pargmann
2014-02-18  0:50   ` [PATCH v5 0/4] ASoC: tlv320aic32x4: DT support Mark Brown
2014-02-18 20:35     ` Markus Pargmann

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=20140218212828.GD10590@pengutronix.de \
    --to=mpa@pengutronix.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox