• Shenwei Wang's avatar
    Serial: imx: add dev_pm_ops to support suspend to ram/disk · 90bb6bd3
    Shenwei Wang authored
    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: default avatarShenwei Wang <shenwei.wang@freescale.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    90bb6bd3
imx.c 55.3 KB