linux/drivers/hid/intel-ish-hid
Even Xu ebeaa36754 HID: intel_ish-hid: ipc: register more pm callbacks to support hibernation
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>
2018-06-20 09:27:23 +02:00
..
ipc HID: intel_ish-hid: ipc: register more pm callbacks to support hibernation 2018-06-20 09:27:23 +02:00
ishtp HID: intel-ish-hid: use put_device() instead of kfree() 2018-04-26 14:36:43 +02:00
ishtp-hid-client.c HID: intel_ish-hid: Stop using a static local buffer in get_report() 2018-04-25 10:52:42 +02:00
ishtp-hid.c HID: intel-ish-hid: format 32-bit integers with %X 2017-01-02 13:16:32 +01:00
ishtp-hid.h HID: intel-ish-hid: ISH HID client driver 2016-08-17 11:13:08 +02:00
Kconfig HID: intel_ish-hid: enable compile testing 2017-05-30 14:11:52 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00