• Claire Chang's avatar
    uart: mediatek: support Rx in-band wakeup · 9315ad99
    Claire Chang authored
    In order to support Rx in-band wakeup, we need to enable irq wake on an
    edge sensitive interrupt of Rx pin before suspend and disable it when
    resuming.
    
    This interrupt is used only as wake source to resume the system when
    suspended. Note that the sent character will be lost as the controller is
    actually suspended.
    
    We use this to support wakeup on bluetooth. Bluetooth will repeatedly send
    0xFD to wakeup host. Once host detects Rx falling, an interrupt is
    triggered, and the system leaves sleep state. Then, the bluetooth driver
    will send 0xFC to bluetooth and bluetooth can start to send normal HCI
    packets.
    Signed-off-by: default avatarClaire Chang <tientzu@chromium.org>
    Reviewed-by: default avatarNicolas Boichat <drinkcat@chromium.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    9315ad99
8250_mtk.c 16.8 KB