diff options
author | Kunihiko Hayashi <hayashi.kunihiko@socionext.com> | 2019-08-20 08:16:04 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-08-20 14:09:55 +0200 |
commit | c372a35550c8d60f673b20210eea58a06d6d38cb (patch) | |
tree | c13e0af3196fcbe7653d7fdb4ad37708e51fbe0e /sound/soc/uniphier/aio.h | |
parent | ASoC: imx-audmux: Add driver suspend and resume to support MEGA Fast (diff) | |
download | linux-c372a35550c8d60f673b20210eea58a06d6d38cb.tar.xz linux-c372a35550c8d60f673b20210eea58a06d6d38cb.zip |
ASoC: uniphier: Fix double reset assersion when transitioning to suspend state
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: 139a34200233 ("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>
Diffstat (limited to 'sound/soc/uniphier/aio.h')
-rw-r--r-- | sound/soc/uniphier/aio.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/uniphier/aio.h b/sound/soc/uniphier/aio.h index ca6ccbae0ee8..a7ff7e556429 100644 --- a/sound/soc/uniphier/aio.h +++ b/sound/soc/uniphier/aio.h @@ -285,6 +285,7 @@ struct uniphier_aio_chip { struct uniphier_aio *aios; int num_aios; + int num_wup_aios; struct uniphier_aio_pll *plls; int num_plls; |