OSDN Git Service

ASoC: soc-core: do pinctrl_pm_select_xxx() as component
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 10 Jan 2020 02:36:13 +0000 (11:36 +0900)
committerMark Brown <broonie@kernel.org>
Fri, 10 Jan 2020 13:33:08 +0000 (13:33 +0000)
commit76c39e867cba338d8982f6372b2c4e3189f6439b
tree064be2e67cd78d3f9da1d687833ae579d99d218b
parentd7a8cb4931652256a01383bb3ea10fab316e72a1
ASoC: soc-core: do pinctrl_pm_select_xxx() as component

ALSA SoC need to care pinctrl_pm_select_xxx().
It is called at soc-core and soc-pcm.
soc-pcm  is controlling it for activate DAI.
soc-core is controlling it for whole system
(= suspend/resume/probe/poweroff).

If we focus to soc-core side, it need to care about BIAS level.
Then, snd_soc_suspend() only is controlling it by Component base (a).
Other functions are DAI base (b).

(a) pinctrl_pm_select_xxx(component->dev, xxx);
(b) pinctrl_pm_select_xxx(dai->dev, xxx);

Because of these unbalance, the code is confusable.
Here, dai->dev and component->dev are same pointer.
Thus, we can replace it component base.

One note here is that it cared DAI (= CPU/Codec) pin before this patch,
after this patch, it cares Component (= CPU/Codec/Platform) pin.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-By: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/874kx4t4v6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c
sound/soc/soc-pcm.c