input: i8042: Avoid resetting controller on system suspend/resume
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 Oct 2015 01:03:57 +0000 (03:03 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 14 Oct 2015 00:17:34 +0000 (02:17 +0200)
commit1c5dd13459fe7caaeda82f7be878720c978d26f2
tree6ed6b708a5b87c01db5e6e52bcb6e8c9d46e0e36
parent58a1fbbb2ee873dd1fe327e80bc7b08e80866269
input: i8042: Avoid resetting controller on system suspend/resume

If the upcoming system suspend is not going to be handled by the
platform firmware, like in the suspend-to-idle case, it is not
necessary to reset the controller in i8042_pm_suspend(), so avoid
doing that.

Moreover, if the system resume currently in progress has not been
started by the platform firmware, like in the suspend-to-idle case,
i8042_controller_resume() need not be called by i8042_pm_resume(),
so avoid doing that too in that case.

Additionally, try to catch the event that woke up the system by
calling the interrupt handler early during system resume if it has
not been started by the platform firmware.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/serio/i8042.c