[alsa-devel] [PATCH v5 2/4] ASoC: tlv320aic32x4: Support for regulators

Mark Brown broonie at kernel.org
Tue Feb 18 02:27:25 CET 2014


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.

> +	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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140218/38621e61/attachment.sig>


More information about the Alsa-devel mailing list