]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Add pinctrl PM to components of active DAIs
authorNicolin Chen <b42378@freescale.com>
Mon, 4 Nov 2013 06:57:31 +0000 (14:57 +0800)
committerMark Brown <broonie@linaro.org>
Mon, 4 Nov 2013 17:08:59 +0000 (09:08 -0800)
commit7ec8ab04e31731a4cf91620164884dd30a1c8588
tree60fdb4dd43c8c8606e98f7bc874ba571ddb9d244
parentabc96a3c5dfe02958082a7e55ba2331989ff75fe
ASoC: Add pinctrl PM to components of active DAIs

It's quite popular that more drivers are using pinctrl PM, for example:
(Documentation/devicetree/bindings/arm/primecell.txt). Just like what
runtime PM does, it would deactivate and activate pin group depending
on whether it's being used or not.

And this pinctrl PM might be also beneficial to cpu dai drivers because
they might have actual pinctrl so as to sleep their pins and wake them
up as needed.

To achieve this goal, this patch sets pins to the default state during
resume or startup; While during suspend and shutdown, it would set pins
to the sleep state.

As pinctrl PM would return zero if there is no such pinctrl sleep state
settings, this patch would not break current ASoC subsystem directly.

[ However, there is still an exception that the patch can not handle,
that is, when cpu dai driver does not have pinctrl property but another
device has it. (The AUDMUX <-> SSI on Freescale i.MX6 series for example.
SSI as a cpu dai doesn't contain pinctrl property while AUDMUX, an Audio
Multiplexer, has it). In this case, this kind of cpu dai driver needs to
find a way to obtain the pinctrl property as its own, by moving property
from AUDMUX to SSI, or creating a pins link/dependency between these two
devices, or using a more decent way after we figure it out. ]

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/soc-core.c
sound/soc/soc-pcm.c