• V
    serial: 8250: omap: Provide ability to enable/disable UART as wakeup source · 09d8b2bd
    Vignesh R 提交于
    Enable/Clear module level UART wakeup in UART_OMAP_WER register based on
    return value of device_may_wakeup() in .suspend(). This allows
    userspace to use sysfs to control the ability of UART to wakeup the
    system from deep sleep state. Register is restored back in .startup()
    call that happens as part of resume sequence.
    
    With this patch, userspace can control UART wakeup capability via sysfs:
    To enable wakeup capability:
    echo enabled >  /sys/class/tty/ttyXX/device/power/wakeup
    For disabling wakeup capability:
    echo disabled > /sys/class/tty/ttyXX/device/power/wakeup
    
    Note that the UART wakeup events configured in the 8250 hardware only
    work for idle modes that do not cut off power for the UART. For deeper
    idle states, dedicated padconf wakeirqs must be used. Or in some cases
    the UART RX pin can be remuxed to GPIO input if the GPIO block stays
    powered.
    Signed-off-by: NVignesh R <vigneshr@ti.com>
    Tested-by: NTony Lindgren <tony@atomide.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    09d8b2bd
8250_omap.c 38.4 KB