[PATCH v4 03/10] ASoC: cs35l41: Move power initializations to reg_sequence

tanureal at opensource.cirrus.com tanureal at opensource.cirrus.com
Wed Dec 15 10:53:07 CET 2021


On 12/15/21 9:10 AM, Charles Keepax <ckeepax at opensource.cirrus.com> wrote:
> On Tue, Dec 14, 2021 at 01:59:52PM +0000, Lucas Tanure wrote:
> > +	{ CS35L41_PWR_CTRL2,		 0x00000000 },
> > +	{ CS35L41_AMP_GAIN_CTRL,	 0x00000000 },
> >   };
> > -	ret = regmap_update_bits(cs35l41->regmap, CS35L41_PWR_CTRL2,
> > -				 CS35L41_AMP_EN_MASK, 0);
> > -	if (ret < 0) {
> > -		dev_err(cs35l41->dev, "Write CS35L41_PWR_CTRL2 failed: %d\n", ret);
> > -		goto err;
> > -	}
> > -
> > -	ret = regmap_update_bits(cs35l41->regmap, CS35L41_AMP_GAIN_CTRL,
> > -				 CS35L41_AMP_GAIN_PCM_MASK, 0);
> > -	if (ret < 0) {
> > -		dev_err(cs35l41->dev, "Write CS35L41_AMP_GAIN_CTRL failed: %d\n", ret);
> > -		goto err;
> > -	}
> 
> Sorry for not spotting earlier but just noticed these two writes
> are update bits, so you shouldn't just be setting the values to
> zero in the patch you just want to clear the relevant bit.
> 
> Thanks,
> Charles
> 
Hi, sorry, that was intentional. This patch is also disabling other
parts of the amp and setting all gains to zero.
I will update the commit message to reflect that.

Thanks
Lucas


More information about the Alsa-devel mailing list