Skip to content

Commit

Permalink
ASoC: rt5670: Correct RT5670_LDO_SEL_MASK
Browse files Browse the repository at this point in the history
The RT5670_PWR_ANLG1 register has 3 bits to select the LDO voltage,
so the correct mask is 0x7 not 0x3.

Because of this wrong mask we were programming the ldo bits
to a setting of binary 001 (0x05 & 0x03) instead of binary 101
when moving to SND_SOC_BIAS_PREPARE.

According to the datasheet 001 is a reserved value, so no idea
what it did, since the driver was working fine before I guess we
got lucky and it does something which is ok.

Fixes: 5e8351d ("ASoC: add RT5670 CODEC driver")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200628155231.71089-3-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Hans de Goede authored and Mark Brown committed Jun 29, 2020
1 parent 0ceb8a3 commit 5cacc6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/rt5670.h
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@
#define RT5670_PWR_VREF2_BIT 4
#define RT5670_PWR_FV2 (0x1 << 3)
#define RT5670_PWR_FV2_BIT 3
#define RT5670_LDO_SEL_MASK (0x3)
#define RT5670_LDO_SEL_MASK (0x7)
#define RT5670_LDO_SEL_SFT 0

/* Power Management for Analog 2 (0x64) */
Expand Down

0 comments on commit 5cacc6f

Please sign in to comment.