]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: wm8804: Enable runtime PM
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tue, 7 Apr 2015 11:55:10 +0000 (12:55 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 8 Apr 2015 18:25:40 +0000 (19:25 +0100)
commit2ed2b943790bf6ac5f952b9440fd73c66f6ac9d5
treed146cc70eb718062b3f7546a896c21bbaf9e4b1d
parentf9404677745739ffa4d2b6643685d59568f79e3f
ASoC: wm8804: Enable runtime PM

Currently both the oscillator and the PLL are powered up in
set_bias_level. This can be problematic when using output clocks from
the wm8804 for other devices. The snd_soc_codec_set_pll API defines that
a clock should be available once the call returns, however, with all the
clocking controlled in set_bias_level this is not currently the case.

This patch enables pm_runtime for the wm8804, enabling both the
regulators and the oscillator when the chip resumes, and enabling the
PLL in the snd_soc_codec_set_pll call. Naturally the enabling the PLL
will also cause the chip to resume.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8804-i2c.c
sound/soc/codecs/wm8804-spi.c
sound/soc/codecs/wm8804.c
sound/soc/codecs/wm8804.h