]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: mediatek: rework clock functions for MT2701
authorRyder Lee <ryder.lee@mediatek.com>
Tue, 2 Jan 2018 11:47:19 +0000 (19:47 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 3 Jan 2018 15:15:24 +0000 (15:15 +0000)
commit86c164f043277bc9cad1152006559f8dfbe827dd
treea7feedb9d1793914fd3f98fe129a1a2a9402b04a
parent692c27e53f36b5936073fd70c080a3beea5e0933
ASoC: mediatek: rework clock functions for MT2701

Reworks clock part to make it more reasonable. The current changes are:

- Replace regmap operations by CCF APIs. Doing so, we just need to handle
  the element clocks and can also get accurate information via CCF.

- Rename clocks to make them more generic so that the future revisions
  of the IP can adapt gracefully.

- Regroup 'aud_clks[]' by usage - the basic needs and I2S parts:

  The new code just keep the common clocks in array and let SoC self decide
  I2S numbers - If future chips have different sets of channels we will
  add a little more abstract here.

  Moreover, this patch moves I2S clocks to the struct mt2701_i2s_data
  so that we can easily manage them when calls .prepare() and .shutdown().

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Tested-by: Garlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h
sound/soc/mediatek/mt2701/mt2701-afe-common.h
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c