tty: serial: exar: Relocate sleep wake-up handling
authorAaron Sierra <asierra@xes-inc.com>
Thu, 25 Jan 2018 00:19:23 +0000 (18:19 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Apr 2018 09:02:11 +0000 (11:02 +0200)
commitc5fda2b8610b96f0035210952fb1dedcd73bf2ee
tree589b58a5dd7383cea73803bf7f12ff7c2fca8e65
parent519a7119527c26984e6804abc422808681d1a117
tty: serial: exar: Relocate sleep wake-up handling

[ Upstream commit c7e1b4059075c9e8eed101d7cc5da43e95eb5e18 ]

Exar sleep wake-up handling has been done on a per-channel basis by
virtue of INT0 being accessible from each channel's address space. I
believe this was initially done out of necessity, but now that Exar
devices have their own driver, we can do things more efficiently by
registering a dedicated INT0 handler at the PCI device level.

I see this change providing the following benefits:

    1. If more than one port is active, eliminates the redundant bus
       cycles for reading INT0 on every interrupt.
    2. This note associated with hooking in the per-channel handler in
       8250_port.c is resolved:
        /* Fixme: probably not the best place for this */

Cc: Matt Schulte <matts@commtech-fastcom.com>
Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_exar.c
drivers/tty/serial/8250/8250_port.c