]> git.baikalelectronics.ru Git - kernel.git/commit
Serial: imx: add dev_pm_ops to support suspend to ram/disk
authorShenwei Wang <shenwei.wang@freescale.com>
Thu, 30 Jul 2015 15:32:36 +0000 (10:32 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 22:51:19 +0000 (15:51 -0700)
commit3d33d88df39fdd3a2ce5cd70b82d8ef1c9913f19
tree6efbae097041cbe6a33ebe6ab8ee281acd8f1704
parentae37637e8b4679018d3461a8f34230e9a83f5154
Serial: imx: add dev_pm_ops to support suspend to ram/disk

When system goes into low power states like SUSPEND_MEM and
HIBERNATION, the hardware IP block may be powered off to reduce
the power consumption. This power down may cause problems on
some imx platforms, because the hardware settings are reset to
its power on default values which may differ from the ones when
it power off. This patch added the dev_pm_ops and implemented
two callbacks: suspend_noirq and resume_noirq, which will save
the necessory hardware parameters right before power down and
recover them before system uses the hardware.

Because added the dev_pm_ops, the old suspend/resume callbacks
under platform_driver will not be called any more. Changed their
prototypes and moved those two callbacks into dev_pm_ops too.

Signed-off-by: Shenwei Wang <shenwei.wang@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c