• Felipe Balbi's avatar
    serial: omap: stick to put_autosuspend · 660ac5f4
    Felipe Balbi authored
    Everytime we're done using our TTY, we want
    the pm timer to be reinitilized. By sticking
    to pm_runtime_pm_autosuspend() we make sure
    that this will always be the case.
    
    The idea behind this patch is to make sure we
    will always reinitialize the pm timer so that
    we don't fall into a situation where pm_runtime_put()
    expires right away (if timer was already about to
    expire when we made the call to pm_runtime_put()).
    
    While suspending right away wouldn't cause any
    issues, reinitializing the pm timer can help us
    avoiding unnecessary context save & restore
    operations (which are somewhat expensive) if there's
    another read/write/set_termios request coming right
    after. IOW, we are trying to make sure UART is still
    powered up while it's still under heavy usage.
    Tested-by: default avatarShubhrajyoti D <shubhrajyoti@ti.com>
    Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
    Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    660ac5f4
omap-serial.c 38.8 KB