net: ipa: manage endpoints separate from clock
authorAlex Elder <elder@linaro.org>
Thu, 17 Sep 2020 17:39:22 +0000 (12:39 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Sep 2020 00:47:07 +0000 (17:47 -0700)
commitdc6e6072d33f83527896f4d75a991a030b54a858
tree7e08720252b4d8f076f39c906bb90df24db90c9f
parent2b09841c7e57c34dc11741ffd3696e91b81bcd79
net: ipa: manage endpoints separate from clock

Currently, when (before) the last IPA clock reference is dropped,
all endpoints are suspended.  And whenever the first IPA clock
reference is taken, all endpoints are resumed (or started).

In most cases there's no need to start endpoints when the clock
starts.  So move the calls to ipa_endpoint_suspend() and
ipa_endpoint_resume() out of ipa_clock_put() and ipa_clock_get(),
respectiely.  Instead, only suspend endpoints when handling a system
suspend, and only resume endpoints when handling a system resume.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_clock.c
drivers/net/ipa/ipa_main.c