LOCAL / mfd: arizona: Call the runtime PM function if the state is runtime resumed
authorInha Song <ideal.song@samsung.com>
Wed, 16 Sep 2015 03:21:36 +0000 (12:21 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 14 Dec 2016 04:48:08 +0000 (13:48 +0900)
commitfeeb63d85973cc01dc2db0e3dcf108c379e9a899
tree06a2af09826406009ef2562c40dca9d0ca7c7d6d
parent64b19680a11d342a6433fec4f60535d614335ba5
LOCAL / mfd: arizona: Call the runtime PM function if the state is runtime resumed

This patch call runtiem PM function manually if the state is runtime resumed
before enter suspend.

This case has occurred when wake-up by the resume after entering to
suspend during the playback.
$ aplay -> runtime_resume() -> suspend() -> resume()

In this case, Can occurred an error when enter suspend.
--
[   82.559234] PM: suspend of devices complete after 57.252 msecs
[   82.567978] arizona spi1.0: Failed to read IRQ status: -108
[   82.567989] arizona spi1.0: Failed to read main IRQ status: -108
[   82.568027] arizona spi1.0: Failed to read IRQ status: -108
[   82.568036] arizona spi1.0: Failed to read main IRQ status: -108
....
So, we should call runtime_suspend() manually when enter suspend
if the state is runtime resume.

Also should call runtime_resume() when wake-up by resume if the state
was runtime resume before entering suspend.

Signed-off-by: Inha Song <ideal.song@samsung.com>
drivers/mfd/arizona-core.c