kernel-fxtec-pro1x/sound/soc/uniphier
Kunihiko Hayashi b1f1b83e25 ASoC: uniphier: Fix double reset assersion when transitioning to suspend state
[ Upstream commit c372a35550c8d60f673b20210eea58a06d6d38cb ]

When transitioning to supend state, uniphier_aio_dai_suspend() is called
and asserts reset lines and disables clocks.

However, if there are two or more DAIs, uniphier_aio_dai_suspend() are
called multiple times, and double reset assersion will cause.

This patch defines the counter that has the number of DAIs at first, and
whenever uniphier_aio_dai_suspend() are called, it decrements the
counter. And only if the counter is zero, it asserts reset lines and
disables clocks.

In the same way, uniphier_aio_dai_resume() are called, it increments the
counter after deasserting reset lines and enabling clocks.

Fixes: 139a342002 ("ASoC: uniphier: add support for UniPhier AIO CPU DAI driver")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://lore.kernel.org/r/1566281764-14059-1-git-send-email-hayashi.kunihiko@socionext.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-10-05 13:09:44 +02:00
..
aio-compress.c ASoC: uniphier: remove boilerplate from lisence comment 2018-04-27 11:26:24 +01:00
aio-core.c ASoC: uniphier: change functions to static 2018-07-30 12:02:32 +01:00
aio-cpu.c ASoC: uniphier: Fix double reset assersion when transitioning to suspend state 2019-10-05 13:09:44 +02:00
aio-dma.c ASoC: uniphier: remove boilerplate from lisence comment 2018-04-27 11:26:24 +01:00
aio-ld11.c ASoC: uniphier: add support for multichannel output 2018-07-30 12:02:31 +01:00
aio-pxs2.c ASoC: uniphier: add support for UniPhier PXs2 AIO 2018-03-09 15:49:42 +00:00
aio-reg.h ASoC: uniphier: add support for multichannel output 2018-07-30 12:02:31 +01:00
aio.h ASoC: uniphier: Fix double reset assersion when transitioning to suspend state 2019-10-05 13:09:44 +02:00
evea.c ASoC: uniphier: evea: use DAPM to change source of line-in 2018-05-09 18:22:00 +09:00
Kconfig ASoC: uniphier: add support for UniPhier PXs2 AIO 2018-03-09 15:49:42 +00:00
Makefile ASoC: uniphier: add support for UniPhier PXs2 AIO 2018-03-09 15:49:42 +00:00