[alsa-devel] [PATCH RESEND v7 2/3] ASoC: add es8328 codec driver
    Charles Keepax 
    ckeepax at opensource.wolfsonmicro.com
       
    Wed Jul  9 11:45:27 CEST 2014
    
    
  
On Thu, Jul 03, 2014 at 10:19:48AM +0800, Sean Cross wrote:
> Add a codec driver for the Everest ES8328.  It supports two separate audio
> outputs and two separate audio inputs.
> 
> Signed-off-by: Sean Cross <xobs at kosagi.com>
> ---
<snip>
> +
> +static int es8328_codec_probe(struct snd_soc_codec *codec)
> +{
> +	struct es8328_priv *es8328;
> +	int ret;
> +	int i;
> +
> +	es8328 = snd_soc_codec_get_drvdata(codec);
> +
> +	for (i = 0; i < ARRAY_SIZE(es8328->supplies); i++)
> +		es8328->supplies[i].supply = supply_names[i];
> +
> +	ret = devm_regulator_bulk_get(codec->dev, ARRAY_SIZE(es8328->supplies),
> +				es8328->supplies);
Is it safe to use devm_ from the ASoC level probe here? I think
there was a discussion recently that this can cause problems on
driver unbinding.
Otherwise this looks pretty good to me.
Thanks,
Charles
    
    
More information about the Alsa-devel
mailing list