]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: resume in ipa_clock_get()
authorAlex Elder <elder@linaro.org>
Tue, 10 Aug 2021 19:27:00 +0000 (14:27 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Aug 2021 12:31:56 +0000 (13:31 +0100)
commitb7d7e0be770edbdfc8a96406c715d6f1c3fa3d2a
tree59981e11109c210fdd4f30959152d5f634f7744a
parent648bb6057a28d04808aa57fcea8543579e3e72ff
net: ipa: resume in ipa_clock_get()

Introduce ipa_runtime_suspend() and ipa_runtime_resume(), which
encapsulate the activities necessary for suspending and resuming
the IPA hardware.  Call these functions from ipa_clock_get() and
ipa_clock_put() when the first reference is taken or last one is
dropped.

When the very first clock reference is taken (for ipa_config()),
setup isn't complete yet, so (as before) only the core clock gets
enabled.

When the last clock reference is dropped (after ipa_deconfig()),
ipa_teardown() will have made the setup_complete flag false, so
there too, the core clock will be stopped without affecting GSI
or the endpoints.

Otherwise these new functions will perform the desired suspend and
resume actions once setup is complete.

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