lkml.org 
[lkml]   [2014]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv2 1/3] ASoC: codec: Simplify ASoC probe code.
On Fri, Feb 28, 2014 at 05:04:25PM +0800, Xiubo Li wrote:

> "Just removing the set_cache_io() call will not work for all
> drivers. There are some MFD child devices which use regmap from the parent
> device. So dev_get_regmap() will return NULL for those."

This is the sort of thing that I was referring to when talking about
doing the non-boring drivers separately. As well as the warnings Lars
mentioned there's a bisection issue here:

> - codec->control_data = da7213->regmap;
> - ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
> - if (ret < 0) {
> - dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
> - return ret;
> - }
> -
> /* Default to using ALC auto offset calibration mode. */
> snd_soc_update_bits(codec, DA7213_ALC_CTRL1,
> DA7213_ALC_CALIB_MODE_MAN, 0);

Unless the core sets up the I/O before calling probe() the above is
going to mean that the snd_soc_update_bits() call fails since the I/O
operations won't have been set up. There is a defualt call to set a
regmap up but it's only done after the probe.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-03-01 06:01    [W:3.681 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site