• Alex Elder's avatar
    net: ipa: resume in ipa_clock_get() · 2abb0c7f
    Alex Elder authored
    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: default avatarAlex Elder <elder@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    2abb0c7f
ipa_clock.c 11.4 KB