mirror of https://gitee.com/openkylin/linux.git
ASoC: Allow writes to uncached registers in WM8990
Only fully documented registers are cached in the WM8990 but additional registers exist. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
7ad933d7a6
commit
ba533e95b9
|
@ -106,6 +106,7 @@ static const u16 wm8990_reg[] = {
|
||||||
0x0008, /* R60 - PLL1 */
|
0x0008, /* R60 - PLL1 */
|
||||||
0x0031, /* R61 - PLL2 */
|
0x0031, /* R61 - PLL2 */
|
||||||
0x0026, /* R62 - PLL3 */
|
0x0026, /* R62 - PLL3 */
|
||||||
|
0x0000, /* R63 - Driver internal */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -126,10 +127,9 @@ static inline void wm8990_write_reg_cache(struct snd_soc_codec *codec,
|
||||||
unsigned int reg, unsigned int value)
|
unsigned int reg, unsigned int value)
|
||||||
{
|
{
|
||||||
u16 *cache = codec->reg_cache;
|
u16 *cache = codec->reg_cache;
|
||||||
BUG_ON(reg > (ARRAY_SIZE(wm8990_reg)) - 1);
|
|
||||||
|
|
||||||
/* Reset register is uncached */
|
/* Reset register and reserved registers are uncached */
|
||||||
if (reg == 0)
|
if (reg == 0 || reg > ARRAY_SIZE(wm8990_reg) - 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cache[reg] = value;
|
cache[reg] = value;
|
||||||
|
|
Loading…
Reference in New Issue