• Alex Elder's avatar
    net: ipa: use device_init_wakeup() · 8529b4b0
    Alex Elder authored
    The call to wakeup_source_register() in ipa_probe() does not do what
    it was intended to do.  Call device_init_wakeup() in ipa_setup()
    instead, to set the IPA device as wakeup-capable and to initially
    enable wakeup capability.
    
    When we receive a SUSPEND interrupt, call pm_wakeup_dev_event()
    with a zero processing time, to simply call for a resume without
    any other processing.  The ipa_resume() call will take care of
    waking things up again, and will handle receiving the packet.
    
    Note that this gets rid of a clock reference counting bug that
    occurred when handling an IPA SUSPEND interrupt.  Specifically,
    ipa_suspend_handler() took an IPA clock reference *in addition*
    to the one taken by ipa_resume().  There is no need to back-port
    this fix however, because it only affects code that was not
    previously working (this patch is part of fixing that).
    Signed-off-by: default avatarAlex Elder <elder@linaro.org>
    Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8529b4b0
ipa_main.c 25.5 KB