diff options
author | Kunihiko Hayashi <[email protected]> | 2019-08-20 15:16:04 +0900 |
---|---|---|
committer | Mark Brown <[email protected]> | 2019-08-20 13:09:55 +0100 |
commit | c372a35550c8d60f673b20210eea58a06d6d38cb (patch) | |
tree | c13e0af3196fcbe7653d7fdb4ad37708e51fbe0e /lib/test_overflow.c | |
parent | 8661ab5b23d6d30d8687fc05bc1dba8f9a64b444 (diff) |
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions