diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-04-14 17:51:33 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-04-14 17:51:33 +0200 |
commit | 85a3685852d9ac7d92be9d824533c915a4597fa4 (patch) | |
tree | b7c542e2061cf96c9f7ad500fa12567f9ff0b39f /drivers/input/serio | |
parent | Input: alps - non interleaved V2 dualpoint has separate stick button bits (diff) | |
parent | Input: atkbd - document "no new force-release quirks" policy (diff) | |
download | linux-85a3685852d9ac7d92be9d824533c915a4597fa4.tar.xz linux-85a3685852d9ac7d92be9d824533c915a4597fa4.zip |
Merge branch 'next' into for-linus
Prepare first round of input updates for 4.1 merge window.
Diffstat (limited to 'drivers/input/serio')
-rw-r--r-- | drivers/input/serio/gscps2.c | 1 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 28 |
2 files changed, 25 insertions, 4 deletions
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index 94ab494a6ade..ecba666afadb 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c @@ -31,7 +31,6 @@ #include <linux/spinlock.h> #include <linux/delay.h> #include <linux/ioport.h> -#include <linux/pci_ids.h> #include <asm/irq.h> #include <asm/io.h> diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 986a71c614b0..cb5ece77fd7d 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -1162,13 +1162,32 @@ static int i8042_controller_resume(bool force_reset) static int i8042_pm_suspend(struct device *dev) { + int i; + i8042_controller_reset(true); + /* Set up serio interrupts for system wakeup. */ + for (i = 0; i < I8042_NUM_PORTS; i++) { + struct serio *serio = i8042_ports[i].serio; + + if (serio && device_may_wakeup(&serio->dev)) + enable_irq_wake(i8042_ports[i].irq); + } + return 0; } static int i8042_pm_resume(struct device *dev) { + int i; + + for (i = 0; i < I8042_NUM_PORTS; i++) { + struct serio *serio = i8042_ports[i].serio; + + if (serio && device_may_wakeup(&serio->dev)) + disable_irq_wake(i8042_ports[i].irq); + } + /* * On resume from S2R we always try to reset the controller * to bring it in a sane state. (In case of S2D we expect @@ -1300,13 +1319,16 @@ static void __init i8042_register_ports(void) int i; for (i = 0; i < I8042_NUM_PORTS; i++) { - if (i8042_ports[i].serio) { + struct serio *serio = i8042_ports[i].serio; + + if (serio) { printk(KERN_INFO "serio: %s at %#lx,%#lx irq %d\n", - i8042_ports[i].serio->name, + serio->name, (unsigned long) I8042_DATA_REG, (unsigned long) I8042_COMMAND_REG, i8042_ports[i].irq); - serio_register_port(i8042_ports[i].serio); + serio_register_port(serio); + device_set_wakeup_capable(&serio->dev, true); } } } |