]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
HID: intel_ish-hid: ipc: register more pm callbacks to support hibernation
authorEven Xu <even.xu@intel.com>
Thu, 11 Feb 2016 20:11:34 +0000 (04:11 +0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Fri, 9 Nov 2018 19:00:29 +0000 (17:00 -0200)
commit70bfb1e4725646a178d14b0a8ed3d88bad85ec9a
treec6c0b11352575c6d409446009d01eeb40fc06269
parentcdb13e7812469eafb44a6137373c117ae2f66c07
HID: intel_ish-hid: ipc: register more pm callbacks to support hibernation

BugLink: http://bugs.launchpad.net/bugs/1800537
commit ebeaa367548e9e92dd9374b9464ff6e7d157117b upstream.

Current ISH driver only registers suspend/resume PM callbacks which don't
support hibernation (suspend to disk). Basically after hiberation, the ISH
can't resume properly and user may not see sensor events (for example: screen
rotation may not work).

User will not see a crash or panic or anything except the following message
in log:

hid-sensor-hub 001F:8086:22D8.0001: timeout waiting for response from ISHTP device

So this patch adds support for S4/hiberbation to ISH by using the
SIMPLE_DEV_PM_OPS() MACRO instead of struct dev_pm_ops directly. The suspend
and resume functions will now be used for both suspend to RAM and hibernation.

If power management is disabled, SIMPLE_DEV_PM_OPS will do nothing, the suspend
and resume related functions won't be used, so mark them as __maybe_unused to
clarify that this is the intended behavior, and remove #ifdefs for power
management.

Cc: stable@vger.kernel.org
Signed-off-by: Even Xu <even.xu@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/hid/intel-ish-hid/ipc/pci-ish.c